Port Forwading does not work when using Codespaces Extension locally #63002
Select Topic AreaBug BodyWhen using the GitHub Codespaces extension in the VSCode app, and connecting to a Codespace, port forwading does not work. Instead it uses the localhost IP instead of the Codespace's URL, probably due to the fact that it doesn't know it is running on a Codespace. When connecting via the online app it works fine. VSCode app connected to CodespaceCodespaces online |
Replies: 2 comments 2 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Hey @skifli- this is by design. The browser-based version of VS Code does not have access to your localhost's IP due to OS restrictions, which is why we have to use the fully qualified domain name when you are using VS Code Online. When working on the desktop-based version we have access to If you require the full domain, changing the forwarded port visibility to org or public will generate the fully qualified codespace domain within VS Code desktop. Thanks! |


Hey @skifli- this is by design. The browser-based version of VS Code does not have access to your localhost's IP due to OS restrictions, which is why we have to use the fully qualified domain name when you are using VS Code Online. When working on the desktop-based version we have access to
localhost, so we point any privately forwarded ports there. This allows a stable URL across codespaces on the desktop. It is still forwarding ports to and from your codespace, we just use a different domain due to differences in permissions between the browser- and desktop-based VS Code instances.If you require the full domain, changing the forwarded port visibility to org or public will generate the …