- 在tomcat bin目录下放置setenv.bat批处理文件
文件内容为:
set CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=4001,server=y,suspend=n"
- idea配置
具体配置如下:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=4001
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4001
-Xnoagent -Djava.compiler=NONE -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4001
- 选择设置的启动项debug启动就行