Child pages
  • Setting Up Tomcat For Remote Debugging
Skip to end of metadata
Go to start of metadata

Tomcat can be configured to allow a program such as eclipse to connect remotely using JPDA and see debugging information.
(powerpoint presentation)

To configure tomcat to allow remote debugging, start tomcat using the catalina startup script (from your tomcat home) instead of the normal startup script like so (tomcat must be stopped before you can change over):


We recommend adding this stuff to your startup script so that you are always running tomcat in debug mode.

  1. Open the startup script in (your_tomcat_home)/bin (WIN: startup.bat, UNIX:
  2. Add the following lines at the first blank line in the file (around line 8)
  3. Change the execute line at the end to include jpda start
  4. Run the startup script when starting tomcat to run tomcat in debug mode

If you're concerned about opening up the known port for debugging, you can change the port on which JPDA listens by setting the JPDA_ADDRESS environment variable to something else (e.g. 38000).

Once you have tomcat configured and started, you can connect to your running tomcat instance using a number of debugging tools. For example, Eclipse has a debugging view that can help you work with tomcat via remote control.

Here are instructions on setting up Eclipse to debug tomcat remotely.

If you are using Eclipse to debug tomcat remotely so in a Windows environment, you may want to prevent tomcat from launching as a separate process, which will prevent the console output from being captured by the Eclipse debugging view. To do so edit the file TOMCAT_HOME/bin/catalina.bat and change:


  • No labels

1 Comment

  1. To configure remote debugging when windows as setup as a service you edit your tomcat configuration and add these startup parameters:

    C:\tomcat\bin> tomcat5w //ES//Tomcat5