Eclipse Remotely Debug Tomcat Distilled 远程调试

1. Environment

Eclipse Luna on Windows 7 64-bit

Tomcat 7 on Linux 64-bit

2. Add setenv.sh under Tomcat's bin directory

File parent folder: tomcat's bin directory

File name: setenv.sh

File content: 

export JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=1043,server=y,suspend=n"
note that don't leave space in "".
3. Start Tomcat

$CATALINA_HOME/bin/catalina.sh jpda start
4. Eclipse Debug Setting
Eclipse->Debug->Debug Configuration...->Remote Java Application

connection type -> Standard (Socket Attach)

Host -> Tomcat server's IP

Port -> 1043

Allow termination of remote VM -> true


Reference:

[1] http://blog.trifork.com/2014/07/14/how-to-remotely-debug-application-running-on-tomcat-from-within-intellij-idea/

你可能感兴趣的:(Eclipse Remotely Debug Tomcat Distilled 远程调试)