21
Jun
09

Debugging java applications running in Tomcat with Eclipse

It is trivial to debug a web application running in Tomcat with the Eclipse IDE.

Simply compile and deploy the web application modules to the Tomcat server. When starting up the server use the parameter jpda; by doing that it will be started up in debug mode. The command to launch from the bin directory will be the following:

./catalina.sh jpda start

By doing that all the applications will run as usual but tomcat will have the debug default port 8000 waiting for possible connectors.

When the tomcat is up and running from eclipse:

Run -> Debug Configurations … and in the popup window create a new launcher for a Remote Java Application. Choose the project you want to debug, set the host to ‘localhost’ and Port to 8000 and the trick is done.

Advertisement

1 Response to “Debugging java applications running in Tomcat with Eclipse”


  1. 1 Karthikraj
    October 9, 2010 at 7:57 AM

    thanks


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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


Follow

Get every new post delivered to your Inbox.