1、windows环境下tomcat的bin目录下catalina.bat中加入:
set CATALINA_OPTS=-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
2.linux环境下catalina.sh中加入:
CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"