4

I seem to recall seeing someone attach a Java debugger to a compiled / deployed GWT application in a screencast. Is this possible? I'm finding some sparse mentions of configuring a special "debug module" that extends your regular one, but details are thin.

Thanks!

spieden
  • 1,239
  • 1
  • 10
  • 23

1 Answers1

6

You can use dev mode to debug deployed application BUT you will debug using your current code (from eclipse) instead of the deployed one. How? Just like with debugging on localhost, change url and it's done:

http://your-test-or-production-or-sth-server.com/application.html?gwt.codesvr=localhost:9997

This will let you debug real problems happening in the environment with real data and previously deployed gwt services (or ejb beans and other stuff). Just remember, that you are not debugging compiled gwt code, you're debugging the code you have used when starting dev mode. You can of course debug the version of the application deployed to the server (by checking out that version from your source control system), but there is no way to actually debug javascript in java (1) that I know of.

(1) - http://code.google.com/p/chromedevtools/

mabn
  • 2,473
  • 1
  • 26
  • 47
  • 1
    Also, run DevMode with the `-noserver` option so that it skips launching its embedded Jetty server with your servlets, as you won't use them when debugging a deployed application. If you have to do it regularly, pass the base URL of the deployed app as `-startUrl` argument so you just have to click in DevMode to launch your browser with the appropriate URL; i.e. `-noserver -startUrl http://myserver/myapp/foo.html` – Thomas Broyer Apr 23 '11 at 08:37