Is there a way to manually set the debugging network interface and port for a local (not a remote) Jetty run configuration in IntelliJ? By default it uses TCP 0.0.0.0 and a random port. Can I override this behavior? Using the normal JVM options doesn't work because it complains about duplication - I guess IntelliJ adds the debugging options behind the scenes. Any way to interfere and set them manually?
Asked
Active
Viewed 427 times
0
-
There is no Startup/Connection tab for Jetty Run/Debug Configuration (since Jetty server has no launch script and it starts as simple java process by IDE), so there is no UI option to change the debug port. Why do you need to change the host/port? – Andrey Nov 24 '17 at 11:29
-
I need it in a situation I have several network interfaces. The 0.0.0.0 uses the first one and sometimes it causes the debugging process to get stuck, for example if it's a virtual network interface like in my case (docker for windows). To get it work back I need to disable the appropriate adapters that's very inconvenient. Note, that not only virtual adapters make this trouble, sometimes WiFi networks block the debugger too (I guess due to some security policies etc.). – Moshe Nov 25 '17 at 20:06
-
What's your OS? IDE needs the localhost address to be resolved to 127.0.0.1 - it uses it by debugger process and for IPC. Check https://youtrack.jetbrains.com/issue/IDEA-157303 Does it help? – Andrey Nov 26 '17 at 08:04
-
My OS is win10. As I wrote before the trouble maker is the virtual network added by "Docker for Windows". Any solution/workaround for windows? – Moshe Nov 26 '17 at 11:59
-
"The 0.0.0.0 uses the first one and sometimes it causes the debugging process to get stuck". The debugger actually always uses the loopback interface (127.0.0.1 ip address) for opening the connection. So the 127.0.0.1 must resolve to localhost.When the network configuration changes on your pc it could change the routing on the machine. When issue happens check that you can ping the localhost address and check that the loopback interface has the highest priority in routing table, see https://blogs.technet.microsoft.com/networking/2015/08/14/adjusting-the-network-protocol-bindings-in-windows-10/ – Andrey Nov 27 '17 at 07:24
-
Thanks. The blog you sent talks about win8, however on win10 the "adapters and bindings order" feature is no longer presented. Do you think that using the local "hosts" file for binding localhost to 127.0.0.1 will have the highest priority in all situations? – Moshe Nov 28 '17 at 08:23
-
The blog post also tells about win10, see "What if you want to change the priority of a specific network card?" It also tells how you can check the priority which is used for the loopback interface. Have you checked your priority? – Andrey Nov 28 '17 at 09:51