Tomcat plugin debugging not working

Tried to set up everything as described here for question How do I remote debug my Tomcat started up by the plugin?

I. Set property in ~/.bashrc on

GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=29999"

II. in a folder of my project using tomcat plugin ran

gradle tomcatRun

Result I can connect to port 29999 when gradle build is being executed, but then VM dies and trying to reconnect fails, even though tomcat is indeed running.

Problem analysis This to me indecates that GRADLE picks up the debug parameter instead of passing it to tomcat’s plugin JVM. The same problem is with Jetty plugin.

System parameters OS: Ubuntu 11.04 - the Natty Narwhal

Gradle: 1.7 Java: 1.6.26 Tomcat: 7.0.42

Was able to get debugging working only with

This should work for the Jetty and the Tomcat plugin. Both plugins use an embedded container implementation that runs in the same JVM as Gradle. Do you see the following output when executing tomcatRun?

Listening for transport dt_socket at address: 29999

Thank you for the replay, Benjamin. Yes, I do see it and actually able to connect to a JVM, but breakpoints do not work. It might an issue with our custom eclipse plugin.

I just verified that breakpoints work in IntelliJ. You might want to try the setup without your custom plugin or a fresh Eclipse distribution.

Right. Okay. We cannot throw away the custom eclipse plugin at this point, but will not loose hope on this plugin in the future then.