Restart run or debug mode when clicking on the button again - intellij-idea

When I used to click Run or Debugin IntelliJ, it used to restart the running process but, now it spins up a new one. How can I change that?

Make sure Allow parallel run option is disabled in the Run/Debug configuration.

Related

How to debug a task configuration instead of running one on JetBrains IDE startup

Is there a way to force JetBrains IDE startup tasks to be debugged instead of being run?
Specifically, I want to configure WebStorm Settings | Tools | Startup Tasks to automatically perform a JavaScript debug task on IDE startup. The debug task only works by debugging it instead of running it, but it seems that WebStorm performs startup tasks by simply running it. I'm using WebStorm 2022.3.
I'm expecting the task to be performed on startup as if it is executed by clicking the Debug button on the top right of the IDE.
debug mode for startup tasks is not supported right now. However, we have a corresponding feature request on our bug tracker. We would appreciate it if you could upvote the issue to demonstrate additional interest and bring increased awareness to the issue.

No restart button for running application in intellij

I have run ,debug ,run with coverage and stop. But there is no button to restart my application.
intellij : 2020.1
Run button changes to rerun if the app is still running. Screenshots from IntelliJ IDEA 2020.1 in Debug and Run mode. You can see this button in Run and Debug tool windows as well as in the toolbar on the right of the run configuration name:
You can also use the keyboard shortcut (Ctrl+F5).
If it doesn't work for you, please provide the Minimal, Complete, and Verifiable example.

how to parallel run the same program in IDEA

Every time a new instance of the run/debug configuration is launched, IntelliJ IDEA checks the presence of the other instances of the same run/debug configuration, and displays a confirmation dialog.If Allow running in parallel checkbox is selected, it is possible to launch a run configuration multiple times in parallel instead of rerunning it. But is doesn't work on my computer.
I think it's because I click DO NOT SHOW THIS DIALOG IN THE FUTURE in the confirmation dialog.It change the RUN turn to RERUN.
I need some way to find the confirm dialog or the way to parallel run the same program.
THANK YOU.
My IDE is WebStorm, but I think it should be the same as IDEA. You can try using:
Menu bar -> Run -> Edit configurations... -> Allow parallel run

How to run shell commands in intellij after debugger ends

I'm trying to spin up docker container when I run a particular configuration in intellij, which I have done successfully by adding a 'Before Launch external tool command', as described here:
IntelliJ IDEA: Running a shell script as a Run/Debug Configuration
What doesn't seem obvious though is how I stop the container when the program has finished running? There doesn't seem to be any options for after.
How do I run a shell script when my run configuration finishes? (Either by reaching it's end, or being forcefully stopped).

Stop all servers in one action in IntelliJ

I am developing with IntelliJ. In this project, I need to run 3 servers.
Is there a way to create a shortcut to :
Stop all those servers in one click or keyboard shortcut
Optionally, restart them.
Thanks.
There doesn't seem to be a direct method to do this in IntelliJ, but if you can stop each one from a script, then you could just write a script and run it from IntelliJ. Personally, I'd just go to the terminal and run the script rather than configuring it directly in IntelliJ (which also has an embedded terminal, btw).