1、编辑catalina.bat
添加一下代码,开放8787端口
set CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787
2、Eclipse
debug configuration->Remote Java application
project选择自己要调试的工程
host:localhost
port:8787
conection type:standard(socket attach)