Thursday, March 08, 2007

How to run AppFuse and Tomcat in debug mode

This is what worked for me:

1. Change %CATALINA_HOME%\bin\startup.bat add the following line:

SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

and run this startup.bat, you should see this line at the top of output:

Listening for transport dt_socket at address: 8000

2. In Eclipse configure it like this:

Now press Debug button. Place a breakpoint somewhere in the code and you are done!

No comments: