Skip to content

Node version detection causes issues with old Electron versions + Node >=12 on the PATH #102035

@alex-griffiths

Description

@alex-griffiths

Issue Type: Bug

After updating VS Code to the June 2020 release, my debugger would no longer launch, instead throwing an error from loader.js.

I can't remember the error exactly because I've already had to downgrade VS Code to continue working, however, the error was something along the lines of

Could not find module /path/to/AppData/Local/Programs/Microsoft

If needed I'll reinstall the June 2020 release to recreate this.

For reference, my launch.json

"configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Electron: Main",
            "protocol": "inspector",
            "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
            "runtimeArgs": [
                "--remote-debugging-port=9223",
                "."
            ],
            "env": {
                "DEVELOPMENT": "true"
            },
            "windows": {
                "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
            }
        },
        {
            "name": "Electron: Renderer",
            "type": "chrome",
            "request": "attach",
            "port": 9223,
            "webRoot": "${workspaceFolder}",
            "timeout": 30000
        },
    ],
    "compounds": [
        {
            "name": "Electron: All",
            "configurations": [
                "Electron: Main",
                "Electron: Renderer"
            ]
        }
    ]
}

VS Code version: Code 1.46.1 (cd9ea64, 2020-06-17T21:13:20.174Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.86GB (9.53GB free)
Process Argv .
Screen Reader no
VM 0%
Extensions (7)
Extension Author (truncated) Version
rust-analyzer mat 0.2.232
debugger-for-chrome msj 4.12.9
rust rus 0.7.8
vscode-todo-list thi 1.0.4
vscode-counter uct 2.0.0
vim vsc 1.14.5
gitblame wad 4.1.0

Downgrading the May 2020 fixed this issue for me temporarily.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releasedebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions