远程 Debug

eclipse + tomcat 实现远程 debug

tomcat 配置

tomcat 根目录下创建新的启动bat: startup-remote-debug.bat 内容如下:

cd /d %~dp0

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

call .\bin\startup.bat catalina

配置完成后,双击startup-remote-debug.bat 启动服务。

eclipse 配置

debug构成中选择 远程debug
连接配置:

host: 172.30.3.30
port: 8001

然后启动debug,会提示连上了。
注意:此种debug不会在控制台输出任何内容。

猜你喜欢

转载自blog.csdn.net/qq_37597428/article/details/132467082