第一步:
1、WIN系统,在catalina.bat里:
SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=88882、Linux系统,在catalina.sh里:
CATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888"
第二步:
选中项目单击右键-->> Debug as -->>Debug Configurations ,新建 Remote Java Application ,
在port中输入上面的8888,勾上 “Allow termination of remote VM” ,再点击 Apply -->> Debug 即可。