Search code examples
intellij-ideajvmremote-debugging

Disconnect from a remote JVM in IntelliJ Idea


I have connected IntelliJ to a remote JVM, and would now like to disconnect from the remote JVM without the remote JVM stopping. In Eclipse there are two buttons that explicitly stop the JVM or disconnect from the JVM, but the buttons on the debug windows in IntelliJ aren't clear. The tooltips and the online help aren't much help.

  • Stop (red square) - "Click this button to terminate the current process externally by means of the standard shutdown script."
  • Close (red X) - "Click this button to close the selected tab of the Run tool window and terminate the current process."
  • Rerun (green arrow around a grey square) - "Click this button to stop the current application and run it again"

I'm pretty sure it's the Stop button, but none of them makes it clear what will happen to the remote JVM.

Which button should I press to safely end the debugging session without killing the remote JVM?


Solution

  • Press the big red stop button (debug panel, on the left). It'll stop the debugger, not the remote process. I don't think you can use the debugger to explicitly kill the remote process -- you're only connected to the debug port and I don't think it can do things like that, unless you deliberately execute a System.exit(0) command in one of the code evaluation windows.