Skip to content

Instantly share code, notes, and snippets.

@EricLondon
Created December 19, 2018 14:33
Show Gist options
  • Save EricLondon/e8c921f6fd8321a03f66a3ed7dab788d to your computer and use it in GitHub Desktop.
Save EricLondon/e8c921f6fd8321a03f66a3ed7dab788d to your computer and use it in GitHub Desktop.
VSCode debug nodejs with NVM launch config
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/test.js",
"runtimeExecutable": "${workspaceRoot}/node.sh"
}
]
}
#!/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