Repository navigation
fix: memory leak in debug visualization registrations - #340046
Merged
Dmitriy Vasyura (dmitrivMS) merged 5 commits intoOct 6, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 5 commits into
Dmitriy Vasyura (dmitrivMS) merged 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused key corrections are correct and covered by regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes leaked extension-host debug visualization registrations by consistently using extension-qualified keys.
Changes:
- Corrects provider and tree-provider disposal keys.
- Adds regression tests for disposal and re-registration.
| File | Description |
|---|---|
src/vs/workbench/api/common/extHostDebugService.ts |
Deletes registrations using their stored extension-qualified keys. |
src/vs/workbench/api/test/browser/extHostDebugVisualization.test.ts |
Tests provider cleanup and re-registration behavior. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
|
Simon Siefke (@SimonSiefke) Thank you! |
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
October 6, 2026 19:15
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 6, 2026
Aaron Munger (amunger)
approved these changes
Oct 6, 2026
roblourens
approved these changes
Oct 6, 2026
Dmitriy Vasyura (dmitrivMS)
merged commit Oct 6, 2026
6ca7758
into
microsoft:main
55 of 56 checks passed
Simon Siefke (SimonSiefke)
deleted the
fix/memory-leak-debugVisualization-registrations
branch
October 13, 2026 09:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Debug visualization providers are registered under a key containing the extension ID and provider ID. Disposal deletes only the provider ID, so the old registrations are never removed.
Change
Use the same extension-qualified key for registration and disposal.
Before
When registering and disposing a debug visualization provider 37 times, 37 old providers remain in the extension host:
After
No more disposed debug visualization providers remain in the same 37-cycle test.
Test Video
debug-vis-desktop-video.webm
AI disclosure: Model: GPT 6 Astra. Worktime: unknown