Tomcat开启调试模式,eclipse与之建立调试

复制startup为start-debug-up,修改内容为:

set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"

rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find "%EXECUTABLE%"
echo This file is needed to run this program
goto end
:okExec

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%
set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=9000
set JPDA_SUSPEND=n

:end

 

 

然后启动,即为tomcat deBug启动模式。

eclipse:

Tomcat开启调试模式,eclipse与之建立调试

选择Dubug-configuration

Tomcat开启调试模式,eclipse与之建立调试

Tomcat开启调试模式,eclipse与之建立调试

点击debug即可

相关文章: