Skip to content

Add Simple Browser option for dashboard launch#15896

Open
adamint wants to merge 1 commit intomicrosoft:mainfrom
adamint:dev/adamint/simple-browser-dashboard
Open

Add Simple Browser option for dashboard launch#15896
adamint wants to merge 1 commit intomicrosoft:mainfrom
adamint:dev/adamint/simple-browser-dashboard

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented Apr 4, 2026

Description

Adds simpleBrowser as a new aspire.dashboardBrowser option that opens the Aspire Dashboard in VS Code's built-in Simple Browser tab, keeping the developer in the IDE. This is now the default value for the setting.

The existing options (openExternalBrowser, debugChrome, debugEdge, debugFirefox) continue to work unchanged.

What's NOT included (tracked separately)

Auto-closing the Simple Browser tab when the debug session ends is blocked on VS Code exposing proper TabInput types for Simple Browser tabs (currently tab.input is undefined). Tracked in #15895.

Closes #14942

Changes

  • AspireDebugSession.ts: Added 'simpleBrowser' to DashboardBrowserType union and a new case 'simpleBrowser' in openDashboard() that calls simpleBrowser.show
  • package.json: Added "simpleBrowser" to the aspire.dashboardBrowser enum, set as new default
  • package.nls.json: Added localized description for the new option
  • aspire-vscode.xlf: Updated XLF with the new localization key

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • No (UI setting + command dispatch — no testable logic)
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
      • New simpleBrowser setting value should be documented

Add 'simpleBrowser' as a new dashboard browser option that opens the Aspire
Dashboard in VS Code's built-in Simple Browser tab. This is now the default
value for aspire.dashboardBrowser.

Auto-closing the Simple Browser tab on debug end is tracked separately in
microsoft#15895, blocked on VS Code exposing proper TabInput types for Simple Browser.

Fixes microsoft#14942
Copilot AI review requested due to automatic review settings April 4, 2026 05:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15896

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15896"

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

Adds a new simpleBrowser option for aspire.dashboardBrowser so the Aspire Dashboard can be opened inside VS Code’s built-in Simple Browser, and updates localization/configuration to support it.

Changes:

  • Add simpleBrowser to the DashboardBrowserType union and handle it in openDashboard() via simpleBrowser.show.
  • Update the aspire.dashboardBrowser setting enum and change its default to simpleBrowser.
  • Add/update localized strings for the new setting value in NLS/XLF files.

Reviewed changes

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

File Description
extension/src/debugger/AspireDebugSession.ts Adds simpleBrowser browser type and opens dashboard via simpleBrowser.show.
extension/package.json Adds simpleBrowser to setting enum and makes it the contributed default.
extension/package.nls.json Adds localized enum description for the new simpleBrowser option.
extension/loc/xlf/aspire-vscode.xlf Adds XLF entries for the new configuration enum description (and other updated strings).
Comments suppressed due to low confidence (1)

extension/package.json:695

  • The configuration schema default is now simpleBrowser, but runtime code still uses a hard-coded fallback of 'openExternalBrowser' when reading aspire.dashboardBrowser (see extension/src/server/interactionService.ts where get('dashboardBrowser', 'openExternalBrowser') is used). This means users who haven’t set the setting will still get external browser launches, so the new default won’t take effect. Consider removing the explicit fallback or updating it to simpleBrowser so the contributed default is honored.
        "aspire.dashboardBrowser": {
          "type": "string",
          "enum": [
            "openExternalBrowser",
            "simpleBrowser",
            "debugChrome",
            "debugEdge",
            "debugFirefox"
          ],
          "default": "simpleBrowser",
          "description": "%configuration.aspire.dashboardBrowser%",
          "enumDescriptions": [
            "%configuration.aspire.dashboardBrowser.openExternalBrowser%",
            "%configuration.aspire.dashboardBrowser.simpleBrowser%",
            "%configuration.aspire.dashboardBrowser.debugChrome%",
            "%configuration.aspire.dashboardBrowser.debugEdge%",
            "%configuration.aspire.dashboardBrowser.debugFirefox%"
          ],

"configuration.aspire.enableAspireDashboardAutoLaunch.off": "Do nothing — the dashboard URL is still printed in the terminal.",
"configuration.aspire.dashboardBrowser": "The browser to use when auto-launching the Aspire Dashboard.",
"configuration.aspire.dashboardBrowser.openExternalBrowser": "Use the system default browser (cannot auto-close).",
"configuration.aspire.dashboardBrowser.simpleBrowser": "Open in VS Code's built-in Simple Browser tab (does not auto-close).",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What do other extensions call opening a website inside VS? Do they call it Simple Browser? tbh I've never heard of that so I don't know if its common term amongst extensions.

Copy link
Copy Markdown
Contributor

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

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

You can work on the naming, this looks fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow using vs code simple browser for dashboard launch

4 participants