Particularly with the shell I had no problems, but you may:
* check your shell is properly configure or [change it](
[To see links please register here]
) (you might be using different shells for vscode or your terminal)
* check your env and if it's not properly set use the [`terminal.integrated.env.<platform>`](
[To see links please register here]
)
I had issues with vscode itself and no solution could help me. So I finished using the following launch script.
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/server.js",
"runtimeExecutable": "/bin/bash",
"runtimeArgs": ["-c", ". ~/.nvm/nvm.sh;nvm run default \"$@\"", "dummy"]
},
this assumes you have it configure for bash (otherwise change it to your shell) and you want to use the `default` node version as configured by nvm (you may also change it).
**Note**: The "dummy" parameter is required so the rest of the parameters are properly parsed.
A longer explanation of "dummy": Shell scripts use positional parameters where the first one will be the script location itself (addressed by `$0`), when using the `-c` flag the script is read inplace an there is no `$0` being set. vscode will pass some arguments, like the node start script location which will be wrongly interpreted, so "dummy" pushes all parameters one spot. It can be just anything, but it must be there.