Add setting to open localhost links from Terminal, chat, etc. in Integrated Browser#289565
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new setting to automatically open localhost URLs in VS Code's Integrated Browser instead of the system browser. The feature is disabled by default and applies to localhost links from various sources like the terminal and chat.
Changes:
- Adds a new
LocalhostOpenerContributionclass that registers as an opener to intercept localhost URLs - Adds a configuration setting
workbench.browser.openLocalhostLinksto control the behavior
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
kycutler
reviewed
Jan 22, 2026
kycutler
approved these changes
Jan 22, 2026
eleanorjboyd
pushed a commit
to eleanorjboyd/vscode
that referenced
this pull request
Jan 23, 2026
…grated Browser (microsoft#289565) * Setting to open localhost links in Integrated Browser * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Rename * Log telemetry for open method * Distinguish commands with and without URL * use isLocalhostAuthority in other use too * Add descriptions for source values * PR Feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds a setting that, when enabled, will open all localhost links (from Terminal, chat, etc.) in the Integrated Browser instead of the system browser. Links to non-localhost URLs are not affected.
Also adds telemetry event
integratedBrowser.openthat logs browser editor (aka browser tab) opening and the source of the opening.Related feature: #286579