Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Debugging with Remote Tomcat

Info
tomcat plugin
tomcat plugin

I use the Sysdeo.com tomcat launcher plugin, which lets you reload specific webapp context aside from just start stop and restart tomcat from the IDE (log output goes to the eclipse console). It is available here: http://www.sysdeo.com/eclipse/tomcatPlugin.html

If you do this too, add the following as two seperate parameters to the JVM settings for starting tomcat (Window->Preferences->Tomcat->JVM Settings):

  1. -Xdebug
  2. -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
  • Start tomcat using
    Code Block
    catalina.sh jpda start
    ..or using the tomcat plugin
  • Inside eclipse select Run->debug....select Remote Java Application and click 'New...'
  • Give the new debug config a name like 'Testing'
  • Set the host and port (default on tomcat is 8000), choose an eclipse project by using the browse button
  • source locations should be already be set to project source locations, so shouldn't need to change anything
  • Checkmark the 'Allow temination of remote VM'
  • click close and save changes

...