Debugging Web-application deployed on Tomcat using Eclipse

This small article will walk you through the steps needed to setup the Eclipse environment for debugging Web application deployed on Tomcat server. I have used Tomcat 6.0.18 and Eclipse Ganymede for this purpose.

  1. Add the following lines in {tomcat.home}/bin/catalina.bat. tomcat.home is your tomcat installation directory.
  2. set JPDA_ADDRESS=1044
    set JPDA_TRANSPORT=dt_socket
  3. Open Eclipse “Debug Configurations” window. Menu Navigation – Run > Debug Configurations…
  4. Add new “Remote Java Application” as below
  5. The “Port” should match to the JPDA_ADDRESS configured above in step #1.
  6. Click “Debug” to start debugging.
  7. Start the Tomcat server using command “catalina jpda run”. This starts Tomcat in debugging mode.
  8. If the “Breakpoint” is encountered while application is being executed, Eclipse will ask you if you want to switch to Debug perspective where you can debug the application using standard debug controls.
  9. There is one nice article on IBM developer works that explains Debugging. Here is one helpful resource to know more about debugging techniques IBM RAD Tutorial .

Hope this helps in setting up a Eclipse Debugger for debugging your applications.  Do let me know if you feel this article needs improvements and your suggestions.

Cheers !



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: