Cannot run debug mode in client code

104 views
Skip to first unread message

tong123123

unread,
Feb 24, 2012, 4:43:30 AM2/24/12
to Google Web Toolkit
I can set breakpoint in server side code but cannot debug in client
side code, my run/debug configuration, Arguments tab > Program
arguments is as follow:
Run/Debug Settings
-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl
http://127.0.0.1:7001/ALS.html -logLevel INFO -noserver -
codeServerPort 9997 -war D:\workspace\ALS_AdministrationConsole\war
com.ha.als.ALS

my server is in localhost (but not using gwt jetty, I use oracle in
localhost)
In IE, if I double click the url
http://127.0.0.1:7001/ALS.html?gwt.codesvr=127.0.0.1:9997
will display
Error 404 -not found
if enter the url
http://127.0.0.1:7001/ALS/
the application can be run, but not in client side debug mode.
what wrong with the program arguments in the debug mode for client
side debugging fail?

Thomas Broyer

unread,
Feb 24, 2012, 4:57:04 AM2/24/12
to google-we...@googlegroups.com
Why is your -startupUrl ending in /ALS.html if the correct URL actually is /ALS/ ?

tong123123

unread,
Feb 24, 2012, 7:19:51 AM2/24/12
to Google Web Toolkit


On Feb 24, 5:57 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> Why is your -startupUrl ending in /ALS.html if the correct URL actually is
> /ALS/ ?

I have not the pc in front of me now, but I remember, ALS is the
project name and Als.html is the project only
One HTML, in Ie, if I enter /als/ , it will automatically jump to
als.html, so should I use /Als/
In startup URL? And I always see the ?codesvr parameter in eclipse.
Console, is it need to append this parameter in
Run/debug configuration?

Thomas Broyer

unread,
Feb 24, 2012, 7:42:00 AM2/24/12
to google-we...@googlegroups.com
DevMode takes the -startupUrl parameters (you can have more than one actually), adds the appropriate ?gwt.codesvr and shows you the URLs so you can easily open them in your browser. So if you need to open /ALS/ in your browser to run the app (in prod mode), then pass http://.../ALS/ to the -startupUrl so that DevMode will propose you the appropriate URL (http://.../ALS/?gwt.codesvr=...)

Joseph Lust

unread,
Feb 24, 2012, 6:55:41 PM2/24/12
to Google Web Toolkit
I actually use this feature all the time.

Use Case:

Production throws an error in the UI, but we don't know why. Ok, let's
debug.

1. Set eclipse to use the remote URL [url parameter in above reply]
(i.e. pull the RPC requests through that Prod site).
2. Checkout the exact version that is built for that Prod release (or
you'll get RPC deserialization errors) to your local Eclipse.
3. Launch in Eclipse as remote dev mode point at the URL in 1.
4. Step through whatever UI exceptions or breakpoints you want.

Of course you can also set server side (backend Java) breakpoints if
you have a port opened for debugging there. This is a killer feature
of GWT.

Sincerely,
Joe

On Feb 24, 7:42 am, Thomas Broyer <t.bro...@gmail.com> wrote:
> DevMode takes the -startupUrl parameters (you can have more than one
> actually), adds the appropriate ?gwt.codesvr and shows you the URLs so you
> can easily open them in your browser. So if you need to open /ALS/ in your
> browser to run the app (in prod mode), then passhttp://.../ALS/to the

tong123123

unread,
Feb 26, 2012, 1:08:25 AM2/26/12
to Google Web Toolkit
Really strange, I try to simulate the problem in home pc (I am not in
office), my debug configuraiton arguments is
-startupUrl 127.0.0.1:7001/DesignerFirstTrial/ -noserver -remoteUI "$
{gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -
codeServerPort 9997 -war C:\workspace\workspace1\DesignerFirstTrial
\war com.mycompany.project.GWTDesignerFirstTrial

but when I run, in eclipse development mode tab, the url shown is
http://127.0.0.1:8888/127.0.0.1:7001/DesignerFirstTrial/?gwt.codesvr=127.0.0.1:9997

that is, it auto prepend 127.0.0.1:8888 in front of the startupUrl,
why is this the case?
I have double checked that there is -noserver argument in the debug
configuration.

tong123123

unread,
Feb 26, 2012, 2:02:33 AM2/26/12
to Google Web Toolkit
sorry, I miss the http:// in the startupUrl, after adding it, the
debug mode can run.
But my eclipse (OEPE- Oracle Enterprise Pack for Eclipse) is very
strange, if I right click the project and select Debug as > Web
application (running on external server), it will create a new debug
configuration like "GWTDesignerFirst.html-external(1) and the debug
configuraiton arguments is wrong again!!

On Feb 26, 2:08 pm, tong123123 <tong123...@gmail.com> wrote:
> Really strange, I try to simulate the problem in home pc (I am not in
> office), my debug configuraiton arguments is
> -startupUrl 127.0.0.1:7001/DesignerFirstTrial/ -noserver -remoteUI "$
> {gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -
> codeServerPort 9997 -war C:\workspace\workspace1\DesignerFirstTrial
> \war com.mycompany.project.GWTDesignerFirstTrial
>
> but when I run, in eclipse development mode tab, the url shown ishttp://127.0.0.1:8888/127.0.0.1:7001/DesignerFirstTrial/?gwt.codesvr=...

Alan Chaney

unread,
Feb 26, 2012, 9:28:27 AM2/26/12
to google-we...@googlegroups.com
On 2/25/2012 10:08 PM, tong123123 wrote:
> Really strange, I try to simulate the problem in home pc (I am not in
> office), my debug configuraiton arguments is
> -startupUrl 127.0.0.1:7001/DesignerFirstTrial/ -noserver -remoteUI "$
> {gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -
> codeServerPort 9997 -war C:\workspace\workspace1\DesignerFirstTrial
> \war com.mycompany.project.GWTDesignerFirstTrial
try
-startupUrl http://127.0.0.1:7001/DesignerFirstTrial/

> but when I run, in eclipse development mode tab, the url shown is
> http://127.0.0.1:8888/127.0.0.1:7001/DesignerFirstTrial/?gwt.codesvr=127.0.0.1:9997
HTH

Alan

Reply all
Reply to author
Forward
0 new messages