Thursday, 26 January 2012

Tomcat 7 Service : start in debug mode

Hit a problem today, doing a really simple tutorial app, so decided to debug Tomcat 7 remotely from Eclipse. I started looking on the web, and almost everything refers to earlier versions of Tomcat.
The ones which did mention running Tomcat 7 didn't appear to be using it as a service, so I had a quick look at the Tomcat site to see if there were any how-to's.

From there, the answer was simple.

From the command line :
H:\Tomcat 7.0\bin\tomcat7 //TS//Tomcat7 -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n

When started like this, Eclipse was able to connect using it's standard remote debug config.