vscode-js-debug icon indicating copy to clipboard operation
vscode-js-debug copied to clipboard

Allow "run anyway" option for `runtimeVersion`

Open matanui159 opened this issue 5 years ago • 2 comments

runtimeVersion is too limiting in that it only supports nvm and nvs, and not fish-nvm or n. While I could ask to try and support every Node version managing program in existence and every program that will be invented in the future, I feel a much better solution is to rather warn users but still let them run node.

As it currently is, it straight-up blocks some developers unless they go through and modify their launch config locally.

matanui159 avatar Apr 17 '20 06:04 matanui159

This seems reasonable.

Code pointer (in our upcoming debugger, currently in preview) if you or anyone else wants to put in a PR:

https://github.com/microsoft/vscode-js-debug/blob/4b5cba447468cd60e949dd2d089b3608e38d5dc1/src/ui/configuration/nodeDebugConfigurationProvider.ts#L113

For bonus points, we could omit the warning if we see that the node version on the user PATH already satisfies the runtimeVersion. We check the major version when launching Node to verify that it's something we can debug. This could be modified and reused for the runtimeVersion check:

https://github.com/microsoft/vscode-js-debug/blob/master/src/targets/node/nodePathProvider.ts

I am also happy to accept PRs for more version managers :)

connor4312 avatar Apr 17 '20 15:04 connor4312

This is a pure js-debug feature request. VS Code knows nothing about the runtimeVersion property.

@roblourens I've have removed you from the Assignees and we should consider to move this request to js-debug.

weinand avatar Aug 31 '21 13:08 weinand