Tomcat未在调试模式下启动.记录下面的日志.
C:\ApacheSoft\apache-tomcat-7.0.67\bin>catalina.bat jpda start Using CATALINA_BASE: "C:\ApacheSoft\apache-tomcat-7.0.67" Using CATALINA_HOME: "C:\ApacheSoft\apache-tomcat-7.0.67" Using CATALINA_TMPDIR: "C:\ApacheSoft\apache-tomcat-7.0.67\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.7.0_79" Using CLASSPATH: "C:\ApacheSoft\apache-tomcat-7.0.67\bin\bootstrap.jar;C:\ApacheSoft\apache-tomcat-7.0.67\bin\tomcat-juli.jar" =transport=dt_socket was unexpected at this time.
解决方法
让我猜一下,你在blog.trifork.com上读到了一个名为“如何在智能IDEA中从远程调试应用程序运行”的链接.
说明在setenv.bat中为Windows执行此操作:
set JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=1043,server=y,suspend=n"
是的,那不行. catalina.bat添加了自己的引号,因此最终尝试执行此操作:
if not ""-agentlib:jdwp=transport=dt_socket,suspend=n"" == "" goto gotJpdaOpts
更好的计划是这样做:
set JPDA_OPTS=-agentlib:jdwp=transport=dt_socket,suspend=n
我知道这是差不多一年前的事了,但我遇到了这个问题,最终不得不从Tomcat批处理文件中删除“@echo off”并自行追查.希望这会被投票,以便它可以拯救别人这种悲伤.