Remote Debugging for Tomcat with Eclipse
Environment:
- Tomcat 5.5.26
- MyEclipse 6
Steps:
1) Setup your tomcat to start with debug support. In catalina.bat/sh, find
find (about line 122):2) Setup Eclipse debug. In MyEclipse/Eclipse,
set DEBUG_OPTS=
replace with:
set DEBUG_OPTS= -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
Run > Open Run Dialog... > Remote Java Application > (Right Click) > New
Input following:
Project: your_project_name
Host: remote_host
Port: remote_port (1044)
Click 'Apply'. Then click 'Debug'
3) Now, when the program (on your remote server) hit the break points, it will prompt the debug perspective.
4) That's all. Enjoy!
Reference:
- Remotely debug your app in Eclipse
http://raibledesigns.com/rd/entry/remotely_debug_your_app_in - Debugging JUnit Tests in Eclipse
http://www.jacoozi.com/index.php?option=com_content&task=view&id=135&Itemid=134 - Remote Debugging with Eclipse
http://wiki.apache.org/tomcat/FAQ/Developing#Q2 - Tomcat Wiki
http://wiki.apache.org/tomcat/FAQ/Developing#Q2