Wednesday, April 02, 2008

How To: Debug Web Applications on Tomcat with JPDA

Suppose you want to debug a servlet in eclipse.


Step 1: Change your catalina.bat with the following changes

if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
set JPDA_TRANSPORT=dt_socket
if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress

Step 2: Start Tomcat with

catalina start jpda

Step 3: Open your debug dialog in Eclipse. Add a remote java application with port "8787".

No change really needed.

$>./ jpda start
$>./ jpda stop

Eclipse needs to have a remote java application with port "8000"

1 comment:

Cameron said...

this is a test comment