tomcat idea 远程调试debug

1、选择idea的Edit Configurations;

2、点击+号,选择Remote;

3、修改远程服务器的IP和端口号,如图所示:


4、tomcat中的catalina.sh 添加 export JAVA_OPTS='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8001'



5、重启tomcat