Skip to content

Debug: Support presentation.hidden in platform-specific launch config sections#300237

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-platform-specific-hiding
Draft

Debug: Support presentation.hidden in platform-specific launch config sections#300237
Copilot wants to merge 2 commits intomainfrom
copilot/add-platform-specific-hiding

Conversation

Copy link
Contributor

Copilot AI commented Mar 9, 2026

Launch configurations already support presentation.hidden to hide entries from the debug dropdown, but this setting could not be scoped to a specific OS. This adds support for specifying presentation inside windows, osx, and linux override sections.

Example usage:

{
  "name": "My Config",
  "type": "node",
  "request": "launch",
  "windows": {
    "presentation": {
      "hidden": true
    }
  }
}

Changes

  • debug.ts — Added presentation?: IConfigPresentation to IEnvConfig (the type used for platform-specific override sections). Moved IConfigPresentation before IEnvConfig to preserve correct declaration order. Added isDebugConfig type guard to distinguish IConfig from ICompound.

  • debugUtils.ts — Added getEffectivePresentationForConfig(config: IConfig) which merges the base presentation with the current-platform override (e.g., windows.presentation on Windows), so per-platform values override base values while non-specified fields are preserved.

  • debugConfigurationManager.tsgetConfigurationNames() and getAllConfigurations() now resolve the effective platform-aware presentation before filtering/sorting, so platform-hidden configs are excluded from the dropdown and command palette on the target OS.

Note: The JSON schema already permitted presentation inside platform sections (it was included in the platformSpecificDefinitionId definition via common properties). This change adds the runtime enforcement.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…form-specific sections

Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for hiding configs on specific platforms Debug: Support presentation.hidden in platform-specific launch config sections Mar 9, 2026
@roblourens roblourens requested a review from Copilot March 9, 2026 19:43
Copy link
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

Adds runtime support for scoping presentation.hidden to platform-specific (windows/osx/linux) debug launch overrides so hidden configs are filtered correctly per-OS.

Changes:

  • Extend platform override typing to include presentation and add an isDebugConfig type guard.
  • Add getEffectivePresentationForConfig to merge base and platform-specific presentation.
  • Resolve effective presentation before filtering/sorting configuration lists.

Reviewed changes

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

File Description
src/vs/workbench/contrib/debug/test/browser/debugUtils.test.ts Adds unit coverage for platform presentation override merging.
src/vs/workbench/contrib/debug/common/debugUtils.ts Implements platform-aware presentation resolution helper.
src/vs/workbench/contrib/debug/common/debug.ts Updates types to allow presentation in platform overrides and adds isDebugConfig.
src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts Applies effective presentation before visibility filtering/sorting.

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.

Debug: Support hiding on a specific platform

3 participants