Offline debugging my gwt app

91 views
Skip to first unread message

yves

unread,
May 20, 2013, 2:46:08 PM5/20/13
to google-we...@googlegroups.com
Hello All,

I need to debug my gwt app. The problem is that I need to debug it OFFLINE.
After a tour on the net, I didn't found an answer.

Thus here is the scenario.

My GWT version is 2.4.0

Debugging the code is ok.
Running in production offline is ok, using a cache manifest.

But I can't do both : debugging offline.

To avoid any config difference, I use exactly the same tomcat server deployment to run in production or in debug mode (thus with the debug option -noserver).
The cache manifest is built in runtime by a dedicated service whose response depends on the current permutation.

When online, the manifest is always requested in debug and in production mode (confirmed by tracing). (a subsidiary question is : why in production the manifest is called twice and in debug it is called once ?).

Then I stopped tomcat.
=> In production offline the gwt app is running correctly.
=> In debug offline, nothing is displayed : the browser has loaded the app html file from its cache (confirmed by displaying the page source code), but the browser remains empty, the gwt app is not running.

It seems that when offline, the google dev plugin doesn't communicate correctly with the IDE as it even doesn't realize when the development mode is stopped in the IDE (the black overlay with the message "Plugin failed to connect to Development Mode server at localhost:9997" is no displayed). May be the plugin is not started when offline ?

In order to help me test my app when offline, does anybody knows why the app is not running in debug offline mode and how to make it run ?

Thanks a lot !
Yves

Joseph Lust

unread,
May 20, 2013, 5:10:35 PM5/20/13
to google-we...@googlegroups.com
It is not clear what you're attempting here. By "Offline" I believe you mean when not using the "DevMode" debugging plugin. You can only debug with the debugger when running in debugging mode. You can however use source maps and set breakpoints in the browser (i.e. Chrome Dev Tools) if you like without using DevMode.

Beyond that, to run your GWT app while not in the DevMode plugin, you'll need to compile and deploy it to a server (i.e. Jetty, Tomcat, JBoss) and start it. If you try to run it not in DevMode, but with the codesvr parameter in the URL, it will fail as it thinks you're trying to use DevMode.


Hope that helps.

Sincerely,
Joseph

yves

unread,
May 20, 2013, 5:18:18 PM5/20/13
to google-we...@googlegroups.com
Thanks for your answer, but my question is about the HTML5 offline feature. Sorry if my post was not clear.

The problem is that I can't debug the GWT app while running it without a connection to the site server, thus "offline".

Yves

Thomas Broyer

unread,
May 20, 2013, 8:51:53 PM5/20/13
to google-we...@googlegroups.com
Is hosted.html / devmode.js (depending on your linker) available offline? (i.e. included in the appcache manifest)

yves

unread,
May 21, 2013, 1:36:28 PM5/21/13
to google-we...@googlegroups.com
Yes hosted.html is included in the CACHE section of the manifest.
I don't have a "devmode.js" file.
Yves

yves

unread,
May 22, 2013, 3:20:46 PM5/22/13
to google-we...@googlegroups.com
Hello GWT-team guys !
Nobody has an idea at least if is it a bug or a feature?
Thanks a lot for your help
Yves

emurmur

unread,
May 23, 2013, 1:21:19 PM5/23/13
to google-we...@googlegroups.com
Yves, I would try SuperDev mode and debug using Chrome Dev Tools and the source maps produced by the super dev mode code server.  You don't need any special changes to your project, you just need to create a way to launch the super dev mode code server.  This is documented at gwtproject.org.here.  Here is a blog post I wrote with detailed instructions.

Ed
Reply all
Reply to author
Forward
0 new messages