Manikandaraj Srinivasan
Manikandaraj Srinivasan

Reputation: 3647

How to debug GWT Projects in JDB?

I m having a GWT Eclipse Project , i m using Eclipse to debug the Project. The GWT Project is dependent on other projects too. Its really easy using Eclipse debugger, but consumes more memory. The Java Process consumes 500MB and eclipse around 500 MB, so does firefox(GWT Plugin) . So i would like to use JDB for debugging my GWT Project.

How can i do that and how to attach Tomcat server to jdb ..?

Upvotes: 1

Views: 247

Answers (1)

Thomas Broyer
Thomas Broyer

Reputation: 64541

GWT has actually nothing special regarding debugging: just launch the DevMode with the appropriate JVM argument (something along the line of -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n for a Sun/Oracle VM) and then attach to it with JDB to debug both the client-side code and the server-side code running within the embedded Jetty.

As for Tomcat, adding jpda to the command line (catalina jpda start instead of catalina start) should be enough: http://wiki.apache.org/tomcat/FAQ/Developing (note: the -Xdebug -Xrunjdwp is the old-style way, before Java 5 shipped with agents and the -agentlib switch; -agentlib is preferred: http://docs.oracle.com/javase/6/docs/technotes/guides/jpda/conninv.html#Invocation )

Upvotes: 1

Related Questions