I'm trying to setup a debug configuration in IntelliJ to remotely connect to a running Jetty server.
Setup is:
- Host machine where IntelliJ is running is Mac OS X
- Jetty is running inside a Vagrant managed guest VM on my Mac
- Per IntelliJ's instructions I've also installed Jetty locally on the host Mac
- There is a shared folder between host/guest where all the Java code lives, let's call it /Development/myproject
- The guest VM is visible to my Mac host via the IP address 10.10.10.10
I have configured jetty to start in debug mode by passing in these args on the java command line:
-Xdebug -agentlib:jdwp=transport=dt_socket,address=57896,suspend=n,server=y
Note that the war file in the guest VM gets deployed to a directory that is not shared with the host (at least the dir is not shared yet...but if I needed I could figure out a way to do it)
All I want to do is attach to an already running Jetty instance so that I can set breakpoints and step through the code. (Extra credit would be getting IntelliJ to actually deploy and to the remote server and hot-swap when classes are changed...but baby steps!)
So my question is, given all this information what are all the correct values to fill in, in the IntelliJ dialog box below?
What should the JMX port be set to? The same port I set above in -agentlib on the command-line? 57896?
What about the other fields?
Thanks much in advance!