Tuesday, December 31, 2013

launching tomcat in debug mode

Add the following line in the startup.bat
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

run tomcat and you should see the first line in the log talking about listening to port 8000

Now from your eclipse you can create a debug configuration as -
debug -> debug configurations -> remote java application.
create new to add
Host - localhost
Port - 8000
hit Debug
Hopefully you are done.