使用Tomcat+Eclipse远程Debug

以前用到过,补录下。

catalina.bat中

行rem Guess CATALINA_HOME if not defined后加入:

if ""%1""==""stop"" goto_skip_config
SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787
:skip_config

其中address为远程debug使用的端口号。eclipse配置如下图所示:

启动Tomcat会在第一行打印出debug配置信息。

原文地址:https://www.cnblogs.com/GYoungBean/p/2948491.html