Is it possible to set a different template configuration for run vs. debug of tests when using the "play" button?
I am using jest to test my code. My typical workflow is to run a single test after writing it. I use the play button built in to the IDE for this. If I'm debugging a test, I need to set a longer timeout so the test does not abort.
However, I don't want this timeout for when I'm running the test to prevent writing tests that are not performant.
Thus, I would like to have a different template for jest when running a test vs debugging a test. I don't want to set this manually when I'm debugging hence the desire to edit the template.
Is it possible to do this? If so, how can I do this?
Please sign in to leave a comment.
No:( You can create 2 run configurations for this test and choose the desired configuration from the configurations dropdown in the main toolbar. There is, however, no way to mark certain configuration as 'debug only' or 'run only', and only one of configurations will be available from the play icon in the gutter...
Darn...should I submit a request for this? It seems like it could be a quality of life boost and currently has no easy workaround. Not sure what the effort looks like. I don't want to submit the request if it's just going to fall in your backlog to die :)
Please feel free to create a feature request in youtrack, https://youtrack.jetbrains.com/issues/IDEA
Related ticket: https://youtrack.jetbrains.com/issue/IDEA-99299