microsoft / microsoft/vscode

Setting to make the "Open in Browser" button and actions always use the external browser

Open
#335,025 1 comment 1 reaction 2 assignees Claimed by @jruales View on GitHub
browser-integration feature-request
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Request

Add a setting that makes the "Open in Browser" actions **always target the external browser** (the one configured in `workbench.externalBrowser`) instead of the Integrated Browser. Concretely:

- the globe button in the title bar (`workbench.browser.showInTitleBar`);
- the "Open in Integrated Browser" action in the editor title for `.html` files;
- links from the terminal, chat and other sources that today are governed by `workbench.browser.openLocalhostLinks`.

Something like:

```jsonc
// Which browser the "Open in Browser" button and actions use.
"workbench.browser.openTarget": "integrated" | "external"
```

Today a user who prefers their regular browser can only **hide** the title bar button and **disable** localhost interception. There is no way to keep the same one-click button and have it open Chrome/Edge/Firefox. The "Open in External Browser" item in the Integrated Browser's three-dot menu is a workaround, not a replacement: it requires opening the page in the Integrated Browser first, and for local `file://` pages it currently fails on Windows (#323733, root cause is the percent-encoded drive letter in the `file:` URL).

## Why

The Integrated Browser cannot replace a real browser for many workflows: extensions (React/Vue devtools, accessibility checkers), browser profiles with logged-in sessions, multi-engine testing, familiar DevTools. #316139 asks to change the *default*; this request is narrower and complements it: even with the default unchanged, let users retarget the existing button and actions once and keep using them.

## Related

- #316139 Turn off integrated browser for default (backlog)
- #323733 "Open in External Browser" fails with 0x2 for local files on Windows

VS Code 1.136.1 (a44adf7f53e00964ab890f9f8758a334f1fc15bc), Windows 11 10.0.26200.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.