microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.73k stars 28.43k forks source link

`pwa-node` debug not working in Insiders #135090

Closed bwateratmsft closed 2 years ago

bwateratmsft commented 2 years ago

Issue Type: Bug

I have a pwa-node launch configuration but when I try to run it, I get this error in a modal popup:

"Couldn't find a debug adapter descriptor for debug type 'pwa-node' (extension might have failed to activate)"

image

I did not see anything relevant in the output windows or in the Running Extensions page.

Found via https://github.com/microsoft/vscode-docker/issues/3264.

VS Code version: Code - Insiders 1.62.0-insider (cad4c193d85f0891204da41c0508de39e7aa38c6, 2021-10-14T05:15:50.815Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz (8 x 3492)| |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)|31.91GB (20.51GB free)| |Process Argv|--crash-reporter-id edba2bce-ac1c-499b-b3ff-28d400cc9143| |Screen Reader|no| |VM|0%|
Extensions (16) Extension|Author (truncated)|Version ---|---|--- memento-explorer|bwa|0.1.1 vscode-eslint|dba|2.2.1 tsl-problem-matcher|eam|0.4.0 vscode-docker|ms-|1.17.0 csharp|ms-|1.23.16 python|ms-|2021.10.1336267007 vscode-pylance|ms-|2021.10.0 jupyter|ms-|2021.10.1001341090 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.3 remote-containers|ms-|0.202.4 remote-ssh|ms-|0.65.8 remote-ssh-edit|ms-|0.65.8 remote-wsl|ms-|0.58.2 vscode-remote-extensionpack|ms-|0.21.0 azure-account|ms-|0.9.9
A/B Experiments ``` vsins829:30139715 vsliv368cf:30146710 vsreu685:30147344 vspor879:30202332 vspor708:30202333 vspor363:30204092 vshan820:30294714 vscod805:30301674 vsccppwt:30377799 bridge0708:30335490 bridge0723:30353136 vsqsis400:30381677 vsaa593:30376534 ```
connor4312 commented 2 years ago

Please search for the @builtin @id:ms-vscode.js-debug extension to see if it got disabled somehow.

bwateratmsft commented 2 years ago

image

Definitely there and enabled, but seems it's not activated though?

I'm wondering if it's happening because we're starting with a docker, request=launch configuration, which resolves into a pwa-node config.

{
    "configurations": [
        {
            "name": "Docker Node.js Launch",
            "type": "docker",
            "request": "launch",
            "preLaunchTask": "docker-run: debug",
            "platform": "node"
        }
    ]
}
bwateratmsft commented 2 years ago

seems it's not activated though

After forcing it to activate with a direct pwa-node config, everything is working. So this is some change to activation behavior in Insiders or in the debugger extension itself; before it would activate ms-vscode.js-debug automatically when the configuration resolved into pwa-node, but it seems it is no longer doing so.

connor4312 commented 2 years ago

Interesting, will debug cc @roblourens

I think my fix to avoid activating js-debug unnecessarily made this worse 😅

roblourens commented 2 years ago

What fix was that?

connor4312 commented 2 years ago

The docker extension changes the debug type during resolution to pwa-node

https://github.dev/microsoft/vscode-docker/blob/6222a8f432d314e985407bc3eba9fdf74e1e9ac8/src/debugging/node/NodeDebugHelper.ts#L87-L108

We only activated debug extensions before config resolutions starts, so js-debug wouldn't get activated at this point.

connor4312 commented 2 years ago

Oh, the fix for js-debug was this one: https://github.com/microsoft/vscode-js-debug/issues/1106 Made this hit slightly more often.

roblourens commented 2 years ago

Makes sense

bwateratmsft commented 2 years ago

/verified