Visual Studio Code to use node version specified by NVM

后端 未结 17 1231
渐次进展
渐次进展 2020-12-07 16:01

Is it possible for VS Code to use node version specified by NVM?

I have 6.9.2 installed locally. Even after switching to another version, from the OS X terminal (no

17条回答
  •  生来不讨喜
    2020-12-07 17:02

    add runtimeExecutable to your .vscode/launch.json like this

    {
      "type": "node",
      "request": "launch",
      "name": "App",
      "program": "${workspaceRoot}/index.js",
      "runtimeExecutable": "${env:HOME}/.nvm/versions/node/v6.9.2/bin/node"
    }
    

提交回复
热议问题