Created
December 19, 2018 14:33
-
-
Save EricLondon/e8c921f6fd8321a03f66a3ed7dab788d to your computer and use it in GitHub Desktop.
VSCode debug nodejs with NVM launch config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", | |
"program": "${workspaceFolder}/test.js", | |
"runtimeExecutable": "${workspaceRoot}/node.sh" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# NVM | |
export NVM_DIR="$HOME/.nvm" | |
. "/usr/local/opt/nvm/nvm.sh" | |
# ENV vars | |
export DEBUG_ENABLED=true | |
# execute with correct node version | |
nvm use | |
nvm run $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment