Identify Run OR Debug session
When running or debugging the configuration does not distinguish between a run process and a debug process.
Invoking a script, the script couldn't tell if it was debug or run.
My use case is running a karma configuration in a webpack environment with TypeScript.
To support breakpoints that hit (and in the right position) I need to disable coverage reports due to errors in one of the loaders in the chain.
I want to disable the reports only in debug mode but not run mode but I can't tell the difference
I can create 2 configurations but this is just confusing.
I would like to be able to set env variables in the configuration base on the mode (run/debug)
Thanks.
Please sign in to leave a comment.
it's not possible to check if karma server is started in run or debug mode. But you can distinguish 'run with coverage' mode from simple run/debug by analyzing `process.argv`: when you run Karma configuration using 'Run with coverage' button, server is started with `--coverageTempDir=/tmp/karma-intellij-coverage` option. So, you can try disabling coverage unless `process.argv` includes `--coverageTempDir` option
Elena, thanks!
This is a temp workaround, however not good as a general purpose solution...
I think it's reasonable to know debug/run ...
Maybe even a general WEBSTORM_DEBGUG env or something...
please feel free to create a feature request in youtrack, https://youtrack.jetbrains.com/issues/IDEA