Remote debugging eclipse with tomcat
Its extremely basic -but I always miss a step or so and end up searching on google. So I though I will just Jot it down -more so for me!
- In bin/catalina.bat add following
set JPDA_OPTS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -
For starting tomcat, do not use startup.bat instead navigate to bin folder from command prompt and use following command to start tomcat
“catalina.bat jpda start” - If tomcat starts listening successfully -it should print a message as
“Listening for transport dt_socket at address: 8000” - select the project and click on debug->debug configurations Under “Remote Java application” -create a new configuration, and then enter
Host -> localhost
Port -> 8000 (same as given in address for JPDA_OPTS)
Next In eclipse,
All set ..eclipse should be able to connect to tomcat and debug points should be enabled in webapp
Posted on November 5, 2013, in Java, Tomcat. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0