Skip to content

Fix crash on null entries in launch.json configurations array - #308235

Merged
roblourens merged 3 commits into
microsoft:mainfrom
bocan:fix/null-launch-config-crash
Apr 14, 2026
Merged

roblourens merged 3 commits into
microsoft:mainfrom
bocan:fix/null-launch-config-crash

Conversation

@bocan

@bocan Chris Funderburg (bocan) commented Apr 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #307691 - if that's of any use Henning Dieterichs (@hediet)

This should parse valid entries in launch.json, but ignore invalid nulls

Copilot AI review requested due to automatic review settings April 7, 2026 15:41
@bocan

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens debug launch configuration handling to avoid a crash when launch.json contains null (or otherwise invalid) entries in the configurations array, as reported in #307691.

Changes:

  • Filter out null/invalid entries from launch.compounds and launch.configurations before de-duplicating by name.
  • Add a regression test ensuring null entries in configurations are ignored.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts Filters invalid launch entries before calling distinguishConfigsByName, preventing null.name crashes.
src/vs/workbench/contrib/debug/test/browser/debugConfigurationManager.test.ts Adds coverage for ignoring null entries in launch.configurations.

@roblourens
roblourens enabled auto-merge (squash) April 14, 2026 17:06
@roblourens
roblourens merged commit 5709736 into microsoft:main Apr 14, 2026
26 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 14, 2026
@bocan
Chris Funderburg (bocan) deleted the fix/null-launch-config-crash branch April 22, 2026 23:18
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators May 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Null entry in launch.json configurations array crashes extension host and breaks GitHub authentication

5 participants