Reputation: 183
I am trying to remote debug my code using intellij but it disconnects in a few seconds . Can anyone suggest how can I prevent or increase the time of disconnection.
Upvotes: 3
Views: 3794
Reputation: 1259
I suspect it is likely not a problem exactly with the Intellij remote debugger. It is likely the fact you are spending time with the JVM completely stopped.
For my situation (with exactly the same symptoms), I was always disconnected after about 1 minute of stepping through the code and looking at things. It was Kubernetes restarting the pod due to liveness check failures. When the pod is restarted the debugger is disconnected.
I solved my problem by changing the breakpoint to be "suspend the thread" rather than "suspend the jvm".
Upvotes: 13