Issues Debugging GWT apps

13 views
Skip to first unread message

divya...@gmail.com

unread,
Aug 27, 2009, 12:40:24 PM8/27/09
to Google Web Toolkit
Hi,

I am new to GWT and eclipse (I have done some Java programming in the
past - long time back though :)).
I am running into an issue regarding debugging.

S/W versions:
- Google Plugin -> 1.1.0
- GWT SDK -> 1.7.0
- Eclipse -> 3.5

When i register a break point, it gets registered properly.
I can go to the Debug Perspective and my breakpoint shows up in the
Breakpoints list.
(I can also see the small blue dot.)

However, the Debugger never halts on the breakpoint.
Execution just runs past it.

I have tried launching the debug mode in various ways.
- Thru the "bug like" shortcut in the tool bar
- Right Click on Package -> Debug As -> Web Application
- Right Click *.gwt.xml -> Debug As -> Web Application

I am playing with the default application created when you create a
new project (Web Application Starter Project).
and i have tried setting breakpoints in onModuleLoad and
sendNameToServer.
I have also written the sample StockWatcher app. Unable to debug it as
well.

Any tips would be appreciated.

Regards,
Divya

mikedshaffer

unread,
Aug 27, 2009, 3:24:49 PM8/27/09
to Google Web Toolkit
Maybe not the greatest amount of help, but look into your Debug
Configurations first. Click the down arrow next to the debug "bug"
icon, and second from the bottom should be "Debug Configurations..."
You should have a Web Application configuration (make sure it has the
blue Google G) in the tree on the left. You should have a leaf under
that labeled "GWTTestProject" or what ever you named your project.
Click that to reveal the configuration (Eclipse sometimes takes you
right here, so the previous couple of steps might be unnecessary). On
the first tab you should have a reference to your project. And the
"run built in server" box should be checked and is probably set for
port 8080 (at least that's how mine is). Unless I'm really on a deep
fishing expedition, I don't look any further on the remaining tabs....
(And I'm doing this from memory on the bus on my phone). I was just
using my set up to run the test project not 20 minutes ago and it was
breaking right on sendNameToServer. I did think of one other thing,
make sure you set your break point on an executable line of code, not
the method declaration line but like the first line in the method.
Eclipse is funny that way....



On Aug 27, 10:40 am, "divya.aj...@gmail.com" <divya.aj...@gmail.com>
wrote:

Thomas Broyer

unread,
Aug 27, 2009, 3:53:48 PM8/27/09
to Google Web Toolkit


On 27 août, 18:40, "divya.aj...@gmail.com" <divya.aj...@gmail.com>
wrote:
> S/W versions:
> - Google Plugin -> 1.1.0
> - GWT SDK -> 1.7.0
> - Eclipse -> 3.5
>
> When i register a break point, it gets registered properly.
> I can go to the Debug Perspective and my breakpoint shows up in the
> Breakpoints list.
> (I can also see the small blue dot.)
>
> However, the Debugger never halts on the breakpoint.
> Execution just runs past it.

Could it be related to this?
http://code.google.com/p/google-web-toolkit/issues/detail?id=3724

divya...@gmail.com

unread,
Aug 28, 2009, 1:50:09 AM8/28/09
to Google Web Toolkit
Thanks, the settings are present as you mentioned.
Initially, i had breakpoints at variable declarations in the
functions.
thinking, it might be a problem (although should not be), i moved the
breakpoints
to regular statements and if conditions.

Something strange happened yesterday.
While i was editing the code with the Hosted mode running,
suddenly breakpoints were hit. Or rather, due to a bug,
the debugger broke into the code.
For that particular instance, breakpoints worked.

Unfortunately, when i restarted the Hosted mode,
i was back to the original problem

divya...@gmail.com

unread,
Aug 28, 2009, 1:58:09 AM8/28/09
to Google Web Toolkit
@Thomas,
Thanks. I did find some information related to debugging not working
in eclipse with JDK version 1.6.14.

I have some lame questions:
- I did not manually install JDK. I installed eclipse 3.5 and the
google plugin.
So, what is the default version of JDK that eclipse uses.
- How do i change this?
Going to Windows->Preferences0>Java->Compiler, i can only change the
compiler compliance level to 1.5, 1.6 etc...
I am assuming this is not the right thing!!

divya...@gmail.com

unread,
Aug 28, 2009, 2:00:01 AM8/28/09
to Google Web Toolkit
Read 1.6.14 as 1.6.0_14 in the previous post :D

On Aug 28, 10:58 am, "divya.aj...@gmail.com" <divya.aj...@gmail.com>
wrote:

divya...@gmail.com

unread,
Aug 28, 2009, 2:25:15 AM8/28/09
to Google Web Toolkit
Tried the following 2 links to change the JDK version:
http://mindlessfodder.wordpress.com/2009/07/24/setting-the-jdk-for-the-eclipse-ide/
http://onkarjoshi.wordpress.com/2008/09/25/configuring-eclipse-to-use-a-jdk-at-a-location-with-spaces-in-it/

Both of them suggest to change eclipse.ini file and pass the -vm
option
No luck yet!!

This is driving me crazy now!!

divya...@gmail.com

unread,
Aug 28, 2009, 2:44:39 AM8/28/09
to Google Web Toolkit
OKAY, finally got it working by changing the JRE configuration.

Followed these steps.
Launched debug configuration.

run -> debug configurations (Opens up the project settings)
choose JRE tab
click Alternate JRE
Add a new JRE by passing the installed JDK directory path
(make sure the new JDK is selected in the drop down list).

Now debug.
Reply all
Reply to author
Forward
0 new messages