It is trivial to debug a web application running in Tomcat with the Eclipse IDE.
Simply compile and deploy the web application modules to the Tomcat server. When starting up the server use the parameter jpda; by doing that it will be started up in debug mode. The command to launch from the bin directory will be the following:
./catalina.sh jpda start
By doing that all the applications will run as usual but tomcat will have the debug default port 8000 waiting for possible connectors.
When the tomcat is up and running from eclipse:
Run -> Debug Configurations … and in the popup window create a new launcher for a Remote Java Application. Choose the project you want to debug, set the host to ‘localhost’ and Port to 8000 and the trick is done.
Advertisement
thanks