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 ..?
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=nfor 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
jpdato the command line (catalina jpda startinstead ofcatalina start) should be enough: http://wiki.apache.org/tomcat/FAQ/Developing (note: the-Xdebug -Xrunjdwpis the old-style way, before Java 5 shipped with agents and the-agentlibswitch;-agentlibis preferred: http://docs.oracle.com/javase/6/docs/technotes/guides/jpda/conninv.html#Invocation )