While tracing some bugs in my project, I need to remote debugging on a remote Tomcat server.

I’ve create file debug.bat with the following lines, save it in Tomcat’s bin directory:

@echo off
set JPDA_TRANSPORT="dt_socket"
set JPDA_ADDRESS="8000"
set JPDA_SERVER="y"
set JPDA_SUSPEND="n"
catalina.bat jpda start

And then, I can start remote debuging. For further information about how to setting Remote Debug in Eclipse or Netbeans, you can see here: http://wiki.apache.org/tomcat/FAQ/Developing. You can find explanation about parameter above there or you cand find it in file catalina.bat itself.

note: I’ve tried this tips in Tomcat 5 and Tomcat 6.