用Eclipse远程调试(Remote debug)Tomcat

用Eclipse远程调试(Remote debug)Tomcat 

1.配置Tomcat支持remotedebugging

给JVM加上如下的启动参数:

-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n 

#SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5888 

2.Eclipse里新建一个RemoteJavaApplications的debug

“Run->Debug…”,then“RemoteJavaApplications”,“New”,port添8000。

相关推荐