Skip to content

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

@minestarks

Description

@minestarks

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?).

  • I am not able to set breakpoints in .ts files
  • I am not able to set breakpoints in the compiled .js files
  • I don't see my extension code under "loaded scripts"

To Reproduce

EDIT: Ignore this repro, it's user error. Instead, please see my comment below for a valid repro with our product repo #2135 (comment)

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.

Metadata

Metadata

Assignees

Labels

author-verification-requestedIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions