1.tomcat配置:在 catalina.sh 添加 jvm 参数配置:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n
2.idea 远程debug:
1.edit configurations -->+-->remote 输入host (服务器地址)和 port(address=8001)
2.debug 模式下启动,在调试的方法内打上断点即可(保证本地代码与服务器代码一致)
参数解释连接:https://blog.csdn.net/benben683280/article/details/78716397