[FrontPage] [TitleIndex] [WordIndex

Tomcat Remote Debuggin

You can debug Tomcat and deployed services like deegree with the Eclipse debugger.

1. Tomcat Configuration

You have to set two environment variables. Put these two lines in your shell configuration (.bashrc, etc):

export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket

When you start Tomcat with './bin/catalina.sh jpda run', the server will listen on port 8000 for a remote debugging session.

2. Eclipse Configuration

To add a new debug configuration:

  1. Select Run, Debug... from the menu.

  2. Right click on Remote Java Application in the left pane and select new

  3. Give it a name like tomcat remote debugging and hit apply

Thats it! Eclipse will hook into Tomcat when you start the new debug target.

3. Debugging

Just insert breakpoints everywhere you like, in your code or in other code. It doesn't matter if the code is included as a class or a jar file.


CategoryDeegree2 CategoryDeegree3


2018-04-20 12:04