1.修改位置
CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=*:8000,server=y,suspend=n"
2.修改环境变量的方式
apache-tomcat-9.0.86/bin/setenv.sh
export JAVA_HOME=/opt/jdk1.8.0_171
export CATALINA_HOME=/opt/apache-tomcat-9.0.86
export JAVA_OPTS="-server -Djava.awt.headless=true -Xms512M -Xmx4096M -Xmn100M -Duser.timezone=Asia/shanghai -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8"
export LANG=zh_CN.UTF-8
export JPDA_ADDRESS="0.0.0.0:8000"
然后启动
apache-tomcat-9.0.86/bin/catalina.sh jpda start