Skip to content

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

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

Fix crash on null entries in launch.json configurations array#308235
roblourens merged 3 commits intomicrosoft:mainfrom
bocan:fix/null-launch-config-crash

Conversation

@bocan
Copy link
Copy Markdown
Contributor

@bocan bocan commented Apr 7, 2026

Fixes #307691 - if that's of any use @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

bocan commented Apr 7, 2026

@microsoft-github-policy-service agree

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 bocan deleted the fix/null-launch-config-crash branch April 22, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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