tomcat中部署了项目,准备测试远程调试.
1.配置idea
2. 修改catalina.bat,并启动tomcat
catalina.bat:
...
rem 下面的参数就是从idea配置中复制过来的,注意没有引号 set JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 setlocal rem Suppress Terminate batch job on CTRL+C if not ""%1"" == ""run"" goto mainEntry if "%TEMP%" == "" goto mainEntry ...
3. 启动tomcat,启动idea远程调试
双击启动tomcat
点击启动idea远程调试,出现"Connected to the target VM, address: '192.168.141.116:5005', transport: 'socket'",表示连接远程服务成功
4.打断点测试。