0

When I run my Node app via VS Code, it uses the node installed in my Program Files directory, but I specifically want to run it with a different version of Node, which is installed in my C:\NodeJS folder.

Is this possible?

Janac Meena
  • 3,203
  • 35
  • 32
  • 1
    Possible duplicate of [VS Code, change NodeJS version for debugger](https://stackoverflow.com/questions/42782144/vs-code-change-nodejs-version-for-debugger) – Jordan Running Feb 09 '18 at 19:50

1 Answers1

0

This might also be helpful:

"nvm" support

If you are using "nvm" (or "nvm-windows") to manage your Node.js versions it is now possible to specify a runtimeVersion attribute in a launch configuration for selecting a specific version of Node.js. Here is an example launch config:

{
  "type": "node",
  "request": "launch",
  "name": "Launch test",
  "runtimeVersion": "7.10.1",
  "program": "${workspaceFolder}/test.js"
}

Please note: Make sure to have those Node.js versions installed that you want to use with the runtimeVersion attribute as the feature will not download and install the version itself. So you will have to run something like nvm install 7.10.1 from the integrated terminal if you plan to add "runtimeVersion": "7.10.1" to your launch configuration.

From node debugging. So you can set a node version in a launch config for purposes of debugging, but their doesn't appear to be a similar option for a task in tasks.json.

Mark
  • 143,421
  • 24
  • 428
  • 436