如何启动Tomcat的调试功能

如何启动Tomcat的调试功能

 

Step 1: 修改catalina.bat文件 

 

拷贝-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9527,suspend=n

catalina.bat文件中的232

rem Execute Java with the applicable properties

if not "%JPDA%" == "" goto doJpda

if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity

%_EXECJAVA% %JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9527,suspend=n   %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

goto end

Step 2: 保存,重启Tomcat 

Step 3: 在eclipse中配置Debug Configurations 

             如何启动Tomcat的调试功能_第1张图片 

              

             其中Connection Properties中配置的Port

         -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9527,suspend=n中指定的端口。

 

你可能感兴趣的:(java,tomcat,socket,server,properties,Security)