On my Ubuntu 16.04 I use IntelliJ IDEA ultima 2017.2 together with node v6.11.2 and npm v3.10.10 and want to debug a node.js application, which has the following package.json start entry:
"start:" "npm-run-all --parallel serve-static open-static"
According to the console output and this similar SO question I need to add $NODE_DEBUG_OPTION as first parameter (for node) to avoid the Connection refused error. Obvioulsy, I have tried
- to add $NODE_DEBUG_OPTION in the Run/Debug configuration as Arguments
- and as Node options
which resulted in calls like
node npm-cli.js run start-debug --scripts-prepend-node-path=auto $NODE_DEBUG_OPTION
and
node $NODE_DEBUG_OPTION npm-cli.js run start-debug --scripts-prepend-node-path=auto
in each case $NODE_DEBUG_OPTION is not resolved and node treats it like a non-existing file.
I have also tried to add variable directly in package.json like
"start:" "npm-run-all $NODE_DEBUG_OPTION --parallel serve-static open-static"
which also results in a Cannot find module .../$NODE_DEBUG_OPTION error.
So, how can I pass this option in order to debug that thingy in IntelliJ IDEA?
Thanks