nativescript-community / nativescript-vscode-extension

A Visual Studio Code Extension for NativeScript
https://www.nativescript.org/visual-studio-code
Apache License 2.0
82 stars 32 forks source link

Support the runtimeVersion attribute for debugging #281

Open thejustinwalsh opened 3 years ago

thejustinwalsh commented 3 years ago

Is your feature request related to a problem? Please describe. I am running on an Apple Silicon M1 mac, and I keep tns running in an x86 version of node 14 using nvm. It is convenient to then have a .nvmrc file sitting in the root, for a nice command line-based workflow. Unfortunately, when using this extension, I must alias nvm v14 as the default version for VSCode to execute tns in the right environment.

Describe the solution you'd like VSCode offers a runtimeVersion attribute used with the node debugger, to correctly set the environment with nvm. Support for the runtimeVersion attribute would be ideal.

Describe alternatives you've considered nvm alias default v14 works or alias default to whatever version of node you have globally installed tns to.

Additional context https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_multi-version-support