vscode: [BISECT] Regression: Debugging Session Does Not Restart on Shift+Ctrl+F5

Does this issue occur when all extensions are disabled?: Yes

Environment

  • VS Code Version: code-insiders-1.99.0-1741930979
  • OS Version: Linux 6.6

good: code-insiders-1.99.0-1741770376.el8.x86_64

Version: 1.99.0-insider Commit: c1fb4c3983bcc28e63dd159dbbb2ea98d352d33e Date: 2025-03-12T08:28:07.410Z Electron: 34.3.2 ElectronBuildId: 11161073 Chromium: 132.0.6834.210 Node.js: 20.18.3 V8: 13.2.152.41-electron.0 OS: Linux x64 6.6.67

bad: code-insiders-1.99.0-1741930979.el8.x86_64.rpm

(see full bisect below)

Version: 1.99.0-insider Commit: 2c7a0283817355c81e1b106f34d911762950a4d9 Date: 2025-03-14T05:04:14.195Z Electron: 34.3.2 ElectronBuildId: 11161073 Chromium: 132.0.6834.210 Node.js: 20.18.3 V8: 13.2.152.41-electron.0 OS: Linux x64 6.6.67

Steps to Reproduce

That the problem does produce itself clearly via bisection of vscode, so I feel confident that this is a vscode bug and not a bug in our tree. see below for the bisection results. At the moment I only know how to reproduce this using our code base, so here are the instructions:

  1. git clone vscode
  2. git clone https://github.com/RooVetGit/Roo-Code.git
  3. cd vscode
  4. npm install
  5. npm compile
  6. ./scripts/code.sh …/Roo-Code
  7. press F5
  8. let it load
  9. click back on main vscode (not the extension host)
  10. Press CTRL+SHIFT+F5
  11. make sure it restarts. the bug presents itself when it does not restart

Debug Information

First bad commit identified through git bisect:

870d14c7b395ec400d1d934a80b715cdafafcbf2 is the first bad commit
commit 870d14c7b395ec400d1d934a80b715cdafafcbf2
Author: Megan Rogge <merogge@microsoft.com>
Date:   Wed Mar 12 10:24:22 2025 -0400

    add task status API (#243092)

 .../extensions/common/extensionsApiProposals.ts    |  3 +
 src/vs/workbench/api/browser/mainThreadTask.ts     | 25 +++++++-
 src/vs/workbench/api/common/extHost.api.impl.ts    |  5 ++
 src/vs/workbench/api/common/extHost.protocol.ts    |  1 +
 src/vs/workbench/api/common/extHostTask.ts         | 22 +++++++
 src/vs/workbench/api/common/extHostTypes.ts        | 42 +++++++++++++
 src/vs/workbench/api/common/shared/tasks.ts        | 53 ++++++++++++++++
 .../contrib/tasks/browser/abstractTaskService.ts   |  6 +-
 .../contrib/tasks/browser/task.contribution.ts     |  2 +-
 .../contrib/tasks/browser/terminalTaskSystem.ts    | 15 ++++-
 .../workbench/contrib/tasks/common/taskService.ts  |  5 ++
 src/vs/workbench/contrib/tasks/common/tasks.ts     | 59 +++++++++++++-----
 src/vscode-dts/vscode.proposed.taskStatus.d.ts     | 70 ++++++++++++++++++++++
 13 files changed, 288 insertions(+), 20 deletions(-)
 create mode 100644 src/vscode-dts/vscode.proposed.taskStatus.d.ts

Git bisect log:

git bisect start
# status: waiting for both good and bad commits
# bad: [2c7a0283817355c81e1b106f34d911762950a4d9] Fix inline chat after updating to use "edit2" in the extension (#243507)
git bisect bad 2c7a0283817355c81e1b106f34d911762950a4d9
# status: waiting for good commit(s), bad commit known
# good: [c1fb4c3983bcc28e63dd159dbbb2ea98d352d33e] fix: pty crash on windows with legacy conpty path (#243267)
git bisect good c1fb4c3983bcc28e63dd159dbbb2ea98d352d33e
# bad: [184545d2802085b88e05279ca341b2820b318fb9] add unit tests for nuanced cases
git bisect bad 184545d2802085b88e05279ca341b2820b318fb9
# bad: [97837b945ab54e88b5f61e42d9bbc6d09c6817b7] handle allRepositorySigned gallery capability (#243358)
git bisect bad 97837b945ab54e88b5f61e42d9bbc6d09c6817b7
# good: [d7d36053045528f020a40ce519b162673b9ed5a9] Merge pull request #243332 from microsoft/tyriar/243306
git bisect good d7d36053045528f020a40ce519b162673b9ed5a9
# bad: [38cc6fe8b4ae0f6ae3a85c1a7e13d2e7ec1de36a] add kind of completion to aria label  (#243241)
git bisect bad 38cc6fe8b4ae0f6ae3a85c1a7e13d2e7ec1de36a
# good: [42a55e8a9989e153ddf1636e245477453b2023c0] Merge pull request #243349 from microsoft/tyriar/243348
git bisect good 42a55e8a9989e153ddf1636e245477453b2023c0
# bad: [8bbfc150ea07e053d5b4df60232ca2184c1e2355] MCP work (#243351)
git bisect bad 8bbfc150ea07e053d5b4df60232ca2184c1e2355
# bad: [870d14c7b395ec400d1d934a80b715cdafafcbf2] add task status API (#243092)
git bisect bad 870d14c7b395ec400d1d934a80b715cdafafcbf2
# first bad commit: [870d14c7b395ec400d1d934a80b715cdafafcbf2] add task status API (#243092)

Additional Context

There is an additional problem related to Error: Invalid problemMatcher reference: $esbuild-watch in our code base, which only appears to be an issue when building vscode from git.

If you encounter this problem, use the following patch in Roo for the purpose of testing your fix:

diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 47112d72..850dcc07 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -41,7 +41,17 @@
 			"type": "npm",
 			"script": "watch:esbuild",
 			"group": "build",
-			"problemMatcher": "$esbuild-watch",
+			"problemMatcher": {
+				"owner": "esbuild",
+				"pattern": {
+					"regexp": "^$"
+				},
+				"background": {
+					"activeOnStart": true,
+					"beginsPattern": "\\[watch\\] build started",
+					"endsPattern": "\\[watch\\] build finished"
+				}
+			},
 			"isBackground": true,
 			"presentation": {
 				"group": "watch",

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks so much for investigating, everyone. I’m going to close this in favor of #244744 because believe they have the same root cause. It seems that #243092 exposed / made this existing problem more prevelant. I will try to work on a fix this iteration.

I wasted an evening on this bug, so I hope posting a workaround helps someone. Personally, I’m leaving this workaround uncommitted and I hope it gets fixed soon.

Thank you for posting that! Your research may help us get closer to the cause now that we understand how to create the problem.

Think I’ll have to reproduce to see what’s happening, though it’s really weird to me that an event firing would impact debugging state. I tried both debugging setups from this issue and neither worked even initially, but I’ll try again tomorrow

I’m confused, I can’t run the extension because of this error from your build script

Image

Same thing if I run it manually but a webview-ui folder is obviously there in the right spot

Image

Am I missing something obvious?

Also, when it doesn’t restart, what does it do? Does it close the extension dev host and not reopen? Do you see a task error or something else, or nothing happens?