How to run something after debugger is launched


I must be missing something very obvious: there's a "Before launch" UI element that allows you to specify something to run before the debug config runs. What I'm looking for is an "After launch" function that will run something after the debugger starts. Specifically, I'm remote debugging and I need to run a script that starts the remote app after I'm sure the debug server is up and running.

Again, it must be something very simple. Thanks!


You'd think it would be something very simple, but the functionality is very simply not there.


I have a similar requirement where I need to run a task against my running weblogic instance that gets spun-up by intellij. I cannot find a way to do this.


This would be very useful. My case: I want to start a docker database before tests run. I can do this by using "Before launch" and setting it to run a gradle task, but I don't see how I can stop the database once the tests are done.


I have the exact same need.  Please add this functionality.


I just figured out a way to do this with PyCharm so it should be possible in all JetBrain IDEs.

If you want Y to run after X, the way to achieve this now is to run X before Y.  In my case I simply want to generate API docs with Sphinx (X) and then launch a browser to view them (Y).  X was a very standard Run configuration and Y was fairly straightforward as type Bash with Script set to  /usr/bin/chromium-browser, Interpreter path as /bin/bash, Program args set to where my index.html got created.

It should be easy to adapt this to any situation.  Ideally JetBrains would provide Launch After settings to provide symmetry with the existing Launch Before settings.


Err, what I wrote works great for Run ordering but alas won't cut it for Debug ordering as was asked since the Before Launch feature only allows you to Run another configuration not Debug another.  Sorry!


I worked around the problem by running a Before Launch script that just waits several seconds (allowing the remote debugger to get started) before it does what it needs to do.


Maybe you can try to add a new configuration from the template  *Compound*

Permanently deleted user


That would be really nice


Hi all,

Please vote for the corresponding feature request
At the moment, the only similar thing you can use is the Compound run configuration, but it applies only to the cases when one doesn't need the second process to wait for the first one to finish.


Please sign in to leave a comment.