masiboo
masiboo

Reputation: 4719

How to stop all running process before a new run in intellij

Is there any way to configure a run configuration in IntelliJ which will stop all running process before running a new run?

I always forget to stop the previous run. So I hit to the point where it says the port is busy by the previous run. So I have to stop the previous run and restart the new run. That takes a long time. I am wondering there should be some way to simplify this process. Please let me know any idea?

p.s: I tried the macro to record multiple steps. That is not working correctly.

Upvotes: 3

Views: 877

Answers (1)

Ortomala Lokni
Ortomala Lokni

Reputation: 62635

As JB Nizet said in the comments, you can check the Single instance only checkbox in the Run/Debug Configurationspanel.

According to the documentation:

Single instance only. In this case, a confirmation dialog box will show up every time you try to launch run/debug configuration, when one instance of the same type is still running.

If you click OK in the confirmation dialog box, the first instance of the runner will be stopped, and the next one will take its place.

If this checkbox is not selected, you can launch as many instances of the runner as required. As the result, each runner will start in its own tab of the Run tool window.

Upvotes: 1

Related Questions