microsoft / microsoft/vscode-js-debug
Support nodenv in the nvm resolver or binary provider
@connor4312 is already working on this.
Since Sep 17, 2020.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 373
- Avg merge
- 1d 9m
- Merged PRs (30d)
- 6
Description
Describe the bug
I can no longer debug apps that don't use at least node12, when using nodenv
To Reproduce
Steps to reproduce the behavior:
- Install nodenv
- Make your default node version >= 12.x
- Make an app that uses a
.node-versionfile to use 10.x for it - Make a launch config to debug this app
- Try to debug it. It fails because it's trying to use the node 12.x
--inspect-publish-uidflag with node 10
VS Code Version: 1.49.0
Additional context
The problem seems to be that the feature enabled in
https://github.com/microsoft/vscode-js-debug/commit/32244ec6b0c979f79a1808cbb506e6ef5900d6b2
relies on resolveAndValidate here
https://github.com/microsoft/vscode-js-debug/blob/2518eeb26140ef2d3c0254056614bf335b7a29d3/src/targets/node/nodeBinaryProvider.ts#L128
And that code doesn't understand that the node binary in use may depend on the working directory, not just PATH from the environment.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.