远程debug配置

eclipse远程debug配置

先在服务器端tomcat容器的bin文件下的setenv.sh中添加如下语句:

JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8777,server=y,suspend=n $JAVA_OPTS"

然后再在eclipse同步代码中配置debug Configuration 中的Remote Java Application ,其中端口号要与服务器端设置的一致才行(address=8777)。

最后点击debug按钮监听服务端的请求。

猜你喜欢

转载自809971096-qq-com.iteye.com/blog/1682747