Repository navigation
Add "Integrated browser" support for code-server #7962
Description
Activity
- addedenhancementSome improvement that isn't a featureSome improvement that isn't a feature
on Aug 25, 2026 Could probably implement it with an iframe, but I am not sure we would want to maintain a patch for that feature here, unless it is a small patch (I am not sure how much work it would be). Would definitely be better to get such a feature merged upstream in VS Code core.
Although if the simple browser extension is not working for only localhost addresses, that could just be a bug in code-server or the extension and it might be easier to fix that. For example maybe we are not properly rewriting localhost URIs to go through the proxy, or maybe the plugin is not using
asExternalUri.code-server/patches/proxy-uri.diff
Lines 111 to 126 in e08e907
+ resolveExternalUri: (uri: URI): Promise<URI> => { + let resolvedUri = uri + const localhostMatch = extractLocalHostUriMetaDataForPortMapping(resolvedUri) + if (localhostMatch && resolvedUri.authority !== location.host) { + if (config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) { + const renderedTemplate = config.productConfiguration.proxyEndpointTemplate + .replace('{{port}}', localhostMatch.port.toString()) + .replace('{{host}}', window.location.host) + resolvedUri = URI.parse(new URL(renderedTemplate, window.location.href).toString()) + } else { + throw new Error(`Failed to resolve external URI: ${uri.toString()}. Could not determine base url because productConfiguration missing.`) + } + } + // If not localhost, return unmodified. + return Promise.resolve(resolvedUri) + }, But when I tried, the extension does not work at all for either local or external hosts.
What is your suggestion?
I would love to see the "integrated browser" from vscode inside code-server (not to be confused with the "simple browser" that is already integrated).
Why do you want this feature?
The simple browser has limitations regarding localhost servers. E.g. reaching a local vite.dev webserver is not possible.
Are there any workarounds to get this functionality today?
You could open a port and expose it via the ports suburl. But that prevents to use automation features that the new "integrated browser" has.
Are you interested in submitting a PR for this?
Yes. I would like the team to estimate whether an integration is technically possible and to know which main knobs need to be turned.
See my issue in the official vscode repo for current technical limitations (vscode.dev)
microsoft/vscode#331784 (comment)