Java-remote-debug

idea远程debug总结

springboot

启动参数添加-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

docker环境配置:

1
CMD ["java","-jar","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005","-Dspring.profiles.active=sit","app.jar"]

idea springboot 远程调试模式之本地
idea基于springboot远程调试之docker环境

tomcat

catalina.sh文件添加CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,suspend=n,server=y"

docker环境配置:

1
2
environment:
CATALINA_OPTS: "-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,suspend=n,server=y"