Wednesday, 19 December 2012

Tomcat remote debugging

You can debug remote server for example from eclipse using JPDA.
For this you need:

in eclipse:
1) just open debug>debug configurations> remote java application

in tomcat in windows we have bin/catalina.bat or in linux bin/catalina.sh

2)  in file head

catalina.bat
set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket
 catalina.sh
export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket

3) change last line
 catalina.bat
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%
 catalina.sh
exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"

No comments:

Post a Comment