Tomcat远程调试配置

Tomcat远程调试JPDA

第一中方法

window下修改tomcatbin下的startup.bat文件将

call"%EXECUTABLE%"jpda%CMD_LINE_ARGS%改成以下代码

setJPDA_TRANSPORT=dt_socket

setJPDA_ADDRESS=8000

setJPDA_SUSPEND=y

call"%EXECUTABLE%"jpdastart%CMD_LINE_ARGS%

第二种方法

1编辑tomcat\bin\catalina.bat,添加

rem===========================================================================

remthisisaddedforremotingdebug

SETJPDA_ADDRESS=8000(注意,此端口一定不能和你的tomcat监听端口一样,比如,你的tomcat如果是8080,此端口,就不能是8080)

SETJPDA_TRANSPORT=dt_socket

setJPDA_SUSPEND=y

rem===========================================================================

启动时必须是:catalina.batjpdastart

linux里的配置:

JAVA_DEBUG_OPT=""

production_mode=false;

JAVA_DEBUG_OPT="-Xdebug-Xnoagent-Djava.compiler=NONE-Xrunjdwp:transport=dt_socket,address=18003,server=y,suspend=n"

CATALINA_OPTS="-server-Xdebug-Xnoagent-Djava.compiler=NONE-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5888"

http://blog.sina.com.cn/s/blog_52fea7b60100dpwj.html

相关推荐