tomcat远程调试:
1、Linux中配置tomcat在catalina.sh中添加如下
CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"(不要换行,要在同一行)
2、Window中修改 catalina,bat文件,添加:
Set "CATALINA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
cmd>startup.bat jpda start
远程调试java程序:
典型的调试参数如下
-Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n
在本地的eclipse中 Debug(小蜘蛛图标)>Debug Configuration...>Remote Java Application>New下创建一个远程调试的项目并设置相关参数
dubbo远程调试:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n -jar basicDubbo-service.jar