I have a gradle jettyRun configuration that I would like to debug through intellij. Where do I find the value for the jetty directory since I'm running jetty through gradle?
Asked
Active
Viewed 639 times
0
-
AFAIK Gradle is running embedded version of Jetty. Just download the same version and add as home. – kukido Jan 20 '14 at 03:00
-
Thanks. I had tried that but got an error trying to connect to it. I'll verify that I have the right version. – Jeff Storey Jan 20 '14 at 03:12
-
Are you able to attach IntelliJ to jetty debugger? That comes before version. – kukido Jan 20 '14 at 03:18
-
When I try to attach to the debugger, I get the error: Debugger failed to attach: recv failed during handshake: Resource temporarily unavailable – Jeff Storey Jan 20 '14 at 03:25
-
Using the same ports? http://stackoverflow.com/questions/9315398/how-to-run-jetty-via-gradle-in-debug-mode – kukido Jan 20 '14 at 03:27
-
I believe so, yes. I see the message both in intellij and in my jetty task, so it looks like they are trying to communicate. – Jeff Storey Jan 20 '14 at 03:30
-
Can you try to attach with jdb? `jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=
` – kukido Jan 20 '14 at 03:34 -
When I ran that, it gave me the output `Set uncaught java.lang.Throwable` `Set deferred uncaught java.lang.Throwable` `Initializing jdb ...` >, so it looks like I can connect (I ran `threads` and it printed out the threads) – Jeff Storey Jan 20 '14 at 03:43
-
When you run gradle with --info, can you see jetty version? – kukido Jan 20 '14 at 04:06
-
It doesn't say the specific version, no, but I'm using gradle 1.10 which I believe uses Jetty 6.1.25. Anyway, I'm going to take a break from working on this - I can debug with Tomcat, so it's not a huge deal. Appreciate the effort though. – Jeff Storey Jan 20 '14 at 04:12