java开启远程调试端口

开启远程调试端口


Linux1

tomcat7/bin/startup.sh的文件开头位置添加

declare -x CATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" 

Linux2:

tomcat7/bin/catalina.sh的文件开头位置添加

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

SpringBoot项目

java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5008 xxxxx.jar


你可能感兴趣的:(java开启远程调试端口)