Honor workbench.externalBrowser setting for GitHub issue creation #263481
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.
The "Create bug on GitHub" button was not respecting the
workbench.externalBrowsersetting, always opening URLs in the system default browser instead of the user's configured preference.Problem
When users clicked the "Create bug on GitHub" button in the issue reporter, the implementation used direct window opening methods:
dom.windowOpenNoOpener()in the browser versionmainWindow.open()for dynamically created GitHub issuesThese methods bypassed VS Code's external browser configuration, forcing users to use their system default browser even when they had configured a different browser via
workbench.externalBrowser.Solution
Replaced direct window opening with
IOpenerService, which properly respects the external browser setting:Before:
After:
Changes
IOpenerServiceinjection and replaceddom.windowOpenNoOpener()callsIOpenerServiceinjection and replacedmainWindow.open()callsIOpenerServiceto base classopenerService.open(url, { openExternal: true })for consistent behaviorTesting
Added unit tests to verify
IOpenerServiceis called with the correct parameters and options.This change ensures that both the legacy GitHub issue reporter (when
issueReporter.experimental.webReporteris false) and the new web-based issue reporter honor the user's browser preference configured viaworkbench.externalBrowser.Fixes #260950.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
electronjs.orgnode-gyp(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.