microsoft / vscode-js-debug

A DAP-compatible JavaScript debugger. Used in VS Code, VS, + more
MIT License
1.67k stars 282 forks source link

Debugger always fails to attach to VS Code extension host (`"type" : "extensionHost"`) #2135

Open minestarks opened 2 hours ago

minestarks commented 2 hours ago

Describe the bug

Recently, VS Code extension debugging using a launch.json configuration stopped working completely. This is with repos and launch.json configurations that used to work just fine (a few months ago?).

To Reproduce

  1. Clone the official "hello world" VS Code extension sample at https://github.com/microsoft/vscode-extension-samples/tree/main/helloworld-sample
  2. Open the folder in VS Code
  3. npm install
  4. Hit F5 in VS Code to launch the extension
  5. Set a breakpoint in extension.ts
  6. Set a breakpoint in out/extension.js

Observe that the breakpoints aren't getting bound.

Log File

vscode-debugadapter-3a2882f3.json.gz

VS Code Version:

Version: 1.95.3 (user setup) Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813 Date: 2024-11-13T14:50:04.152Z Electron: 32.2.1 ElectronBuildId: 10427718 Chromium: 128.0.6613.186 Node.js: 20.18.0 V8: 12.8.374.38-electron.0 OS: Windows_NT x64 10.0.22621

Additional context

Originally encountered in when working in the Q# extension at https://github.com/microsoft/qsharp - but I did repro in every other VS Code extension I tried.

minestarks commented 2 hours ago

@connor4312 Is the attached log corrupt? I can't unzip it on my end. I tried a few times, but I'm unable to get VS Code generate a valid file. Sorry :/