2
votes

i have a maven gwt application with maven-jetty plugin, i tried to to debug the code with 'mvn jetty:run-war' and 'mvn gwt:debug', it start the application in gwt dev mode so i can debug the client side code but not the server side, how can i debug both the client side and server side code? i tried 'mvnDebug jetty:run-exploded', it said:

Preparing to Execute Maven in Debug Mode
Listening for transport dt_socket at address: 8000

then i brought up a browser point it to localhost:8000, nothing loaded and in the terminal it spitted out the message:

Debugger failed to attach: handshake failed - received >GET / HTTP/1.1< - excepted >JDWP-Handshake<
Debugger failed to attach: handshake failed - received >GET / HTTP/1.1< - excepted >JDWP-Handshake<
Debugger failed to attach: timeout during handshake

i have no clue what it mean? anyone can help me?

2

2 Answers

1
votes

Port 8000 in the case you listed is the port that your remote debugger will connect to your remote instance, it is not for you to view the application. The GUI itself is most likely available over 8080 or 8888, but that depends on the config in Jetty or if you're running in Hosted Mode.

You need to connect a remote debugger to Jetty, like Eclipse or NetBeans whatever your IDE is.

http://docs.codehaus.org/display/JETTY/Debugging+Jetty+with+Eclipse http://www.vijaykiran.com/2009/05/12/debugging-maven-jetty-web-application-in-netbeans/

Using Hosted Mode might be helpful as well: http://code.google.com/webtoolkit/doc/1.6/FAQ_DebuggingAndCompiling.html#How_do_I_use_my_own_server_in_hosted_mode_instead_of_GWT's

More Advanced: http://www.vogella.de/articles/EclipseDebugging/article.html

1
votes

From your IDE you have to create remote debugging after launching debug from maven. In Eclipse you can do this by going to the Debug Configuration and create new Remote Java Application configuration. Then just refresh the page of your app in browser and start debugging.

If you use some other IDE, you have to find out how to use remote debugging for it by yourself. It is pretty much the same everywhere.