Skip to content

Instantly share code, notes, and snippets.

@ilguzin
Created June 14, 2018 06:04
Show Gist options
  • Save ilguzin/ae375453082ed95e44476b4ddffb545f to your computer and use it in GitHub Desktop.
Save ilguzin/ae375453082ed95e44476b4ddffb545f to your computer and use it in GitHub Desktop.
VS Code NodeJS settings.
  1. Create a folder .vscode in you workspace directory (anotherwords in project dir).
  2. Make sure you have $NVM_DIR/nvm-exec and $NVM_DIR/nvm.sh. If not then ln them into $NVM_DIR/
  3. Puth 3 files there: node.sh .nvmrc launch.json
{
"type": "node",
"request": "launch",
"name": "Launch program",
"program": "${workspaceRoot}/index",
"runtimeExecutable": "${workspaceRoot}/node.sh",
"protocol": "legacy"
}
#!/bin/bash
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm run $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment