Category Archives: note to self

Tomcat Debugging

I use cygwin on my windows box at work to run tomcat.  I wanted to be able to debug tomcat from eclipse but everything I found on google talked about adding environment variables and seemed over complicated.  Based on the apache wiki it’s really simple.  In cygwin find your Tomcat’s bin directory and run the following:

catalina.sh jpda start
catalina.sh jpda stop

It’ll start the debugger on port 8000.  Go into eclipse and create a “Remote Java Application” debug configuration and connect to that port on localhost.  Why so much fuss?