Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code: port for preview isn't forwarded #243

Open
kcarnold opened this issue Aug 18, 2023 · 1 comment
Open

VS Code: port for preview isn't forwarded #243

kcarnold opened this issue Aug 18, 2023 · 1 comment

Comments

@kcarnold
Copy link

Using Quarto through a Remote Tunnel in VS Code almost works great, but the preview functionality fails to load because it opens an inline browser window to http://localhost:TEMP_PORT, and that port isn't forwarded over the tunnel.

The Remote Tunnel infrastructure provides extensive support for forwarding ports automatically, to the extent that you generally have to opt out of having that happen: microsoft/vscode#115616 - so I'm not sure why that isn't happening here.

@jjallaire
Copy link
Contributor

We do some calculations to compute the correct external URL for various platforms and scenarios. You can see that code here: https://github.com/quarto-dev/quarto-cli/blob/main/src/core/platform.ts

As you can see we try currently detect JupyterHub, Code Server, Posit Workbench, and WSL. Perhaps there is something else we should be doing for the Remote Tunnel scenario? Here is the code where we try to output the correct URL from quarto-cli (which will then be read from the Quarto Extension and used for the preview window): https://github.com/quarto-dev/quarto-cli/blob/main/src/command/render/render-shared.ts#L142

Since I don't have a remote tunnel setup for VS Code, the easiest way through this might be for you to run the dev version of quarto-cli and see if you can play with the above to get it to work. Once you find out the right path we can commit that change. To run the dev version follow these instructions: https://github.com/quarto-dev/quarto-cli/tree/main#development-version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants