[答傻姑]如何用eclipse远程调试tomcat

01:38上午 九月 04, 2008 in category General by nile black

问:如何在eclipse远程调试tomcat?
答:先找到tomcat\bin\catalina.bat,在文件开头添加

set JAVA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888

重启启动Tomcat,在控制台就应该能够看到,下文类似的输出

Listening for transport dt_socket at address: 8888

在eclipse打开debug configurations对话框,新建一个remote debug,配置如下

注意两个端口要一致哦。

Comments:

Post a Comment:
Comments are closed for this entry.