Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abbreviated runtimeVersion in launch.json not working #128506

Closed
wongjn opened this issue Jul 12, 2021 · 4 comments
Closed

Abbreviated runtimeVersion in launch.json not working #128506

wongjn opened this issue Jul 12, 2021 · 4 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues polish Cleanup and polish issue
Milestone

Comments

@wongjn
Copy link

wongjn commented Jul 12, 2021

Issue Type: Bug

$ nvm list
        v8.17.0
       v10.22.0
->     v12.22.1
       v14.17.0
        v16.3.0
…

launch.json:

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Jest",
      "program": "${workspaceRoot}/node_modules/.bin/jest",
      "args": ["--color"],
      "outputCapture": "std",
      "runtimeVersion": "16"
    }
  ]
}

Running this debug task fails with "Node.js version '16' cannot be found for 'nvm'":
Unexpected error message

However, if the value of runtimeVersion to a specific version I have installed ("runtimeVersion": "16.3.0" in this case), the debug task runs as expected.

I believe this is a bug since the Multi version support section of Node.js debugging documentation states that:

If you omit the minor and patch version and have, for example, "runtimeVersion": "14", then the most recent 14.x.y version installed on your system will be used.

So my understanding here is that 16.3.0 should be used in this setup and should not error.

VS Code version: Code 1.58.0 (2d23c42, 2021-07-08T06:54:55.083Z)
OS version: Windows_NT x64 10.0.19041
Restricted Mode: No
Remote OS version: Linux x64 5.4.72-microsoft-standard-WSL2
Remote OS version: Linux x64 5.4.72-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz (4 x 3292)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.94GB (8.09GB free)
Process Argv --crash-reporter-id 62e8c2a1-a04c-4909-a237-849e0701279d
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-18.04
OS Linux x64 5.4.72-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz (4 x 3292)
Memory (System) 5.80GB (3.31GB free)
VM 0%
Item Value
Remote WSL: Ubuntu-18.04
OS Linux x64 5.4.72-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz (4 x 3292)
Memory (System) 5.80GB (3.31GB free)
VM 0%
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jul 12, 2021
@weinand weinand removed their assignment Jul 12, 2021
@connor4312
Copy link
Member

You'll need to set your launch type to pwa-node for this to work. The old node type is redirected through the previous debugger, but only after it tries (and failed) to resolve that version number. This'll no longer be necessary when the old debugger (eventually) goes away entirely.

@connor4312
Copy link
Member

Oh, yea, I see we recommend that in our docs. That needs to be updated.

@connor4312
Copy link
Member

The old debuggers are being removed next month, so I will just assign this to that iteration since it'll be fixed at that point.

@connor4312 connor4312 modified the milestones: July 2021, August 2021 Jul 27, 2021
@connor4312
Copy link
Member

Fixed with microsoft/vscode-js-debug#1065

@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues polish Cleanup and polish issue
Projects
None yet
Development

No branches or pull requests

3 participants