I am trying to debug a GWT application, but it seems I can't do it with jetty. Whenever I try to run it in hosted mode for debugging I get an 'unknown realm' 500 error message (nothing loads). I am doing this via eclipse. It is very uncovenient to have to compile everything to debug in the browser afterwards.
After compilation I deploy the war into JBoss (using EJB on the server). But compilation takes time and when the code has been turned into javascript, you can't really debug. How can I debug the java code? I am looking into the -noserver option, but I wonder if I could still do it with jetty. And if not, why not.
There are two points in your question:
<login-config>
in your web.xml
): see http://code.google.com/p/google-web-toolkit/issues/detail?id=4462#c5 (now that this bug is fixed, you only have to put the userRealm
in the jetty-web.xml
and you can now use <login-config>
in your web.xml
)-noserver
to debug GWT code: using -noserver
you won't be using the embedded Jetty in DevMode, so only your client-side code will run in DevMode. Your server-side code will run within the server where you deployed the app, and you'll debug it as you would debug any other Java server-side code (i.e. launch your JBoss server in debug mode and connect to it remotely with a Java debugger). To use -noserver
you have to make sure the .nocache.js
and hosted.html
files are served by your server, either by first compiling your GWT code and deploying it, or by using your server's app folder as the -war
of the DevMode (so DevMode will generate the files in the same folder as the web server serves files from)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With