Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij IDEA creates multiple process for each debug session?

Every time I hit the debug button in my IDE is create a new process running on the OS.

enter image description here

Is there a way to configure things so that only one JAVA process can be running on my OS at once when hitting the debug button?

What I know is if I hit the red stop button in the debugging panel that number will decrement. So long as I remember to stop before hitting the debug button each time I can manage the number of running processes. But this is easy to forget to do. In addition, once i have 5-10 running debug sessions it is very tedious to delete them all. I must go to Run->Show Running List and a list of the "VM Connections" appear and I must delete them one by one. Often this UI component that lists them will simply disappear and I must pull it out again. Is there a way to end all of these processes at once?

like image 565
Alex Bollbach Avatar asked Mar 20 '16 20:03

Alex Bollbach


1 Answers

You can't do it OS wide AFAIK, and you wouldn't want it to be that way; how many other Java processes may be running that aren't associated with your debug sessions?? (Intellij would be one of them)

What you can do is, in your run configuration settings, set one or more of your configurations to be "Single instance only"; it's a checkbox in the upper right-hand corner of the dialogue. That will force you to kill any running with that config before starting another.

like image 176
ChiefTwoPencils Avatar answered Oct 03 '22 10:10

ChiefTwoPencils