Can't get suspend=y working when remote debugging Tomcat 7

I can successfully step-through debug tomcat but when I attempt to run it with the suspend=y option, so I can catch the parts the happen right at startup, it doesn't work. I get the following error message:

Error running Tomcat:
Unable to connect to the devserver:8380

The app runs on port http port 8380. I've tried using the debug address, 4458, and that doesn't work either.

Can anyone tell me what I might be doing wrong?

I'm running java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Tomcat: apache-tomcat-7.0.47

IntelliJ: 12.1.6

OSX: 10.8.5

Here's the java command issued to start tomcat:

/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home//bin/java -Djava.util.logging.config.file=/Users/myusername/work/myclient/matching/tomcat-dest/conf/ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms1024m -Xmx1024m -Duser.timezone=America/Los_Angeles -verbose -agentlib:jdwp=transport=dt_socket,address=4458,suspend=y,server=y,timeout=10000 -javaagent:/Users/myusername/Library/Caches/IntelliJIdea12/groovyHotSwap/gragent.jar -Djava.endorsed.dirs=/Users/myusername/work/myclient/matching/tomcat-dest/endorsed -classpath /Users/myusername/work/myclient/matching/tomcat-dest/bin/bootstrap.jar:/Users/myusername/work/myclient/matching/tomcat-dest/bin/tomcat-juli.jar -Dcatalina.base=/Users/myusername/work/myclient/matching/tomcat-dest -Dcatalina.home=/Users/myusername/work/myclient/matching/tomcat-dest org.apache.catalina.startup.Bootstrap start

1 comment
Comment actions Permalink

For anyone else interested, here's the official reply:

In summary:

If you need to debug the app server itself, you may either:
1) use generic 'Remote' run configuration
2) use local Tomcat run configuration


Please sign in to leave a comment.