You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see in this discussion thread for the quarto CLI, it creates random ports every time it is run. The problem with this random port process is the workflow listed below, if done in a VS Code dev container, or even just in WSL on Windows. It produces lots of forwarded ports that the VS Code session keeps track of.
Steps to reproduce
Write a document in VS Code in .md format.
Press Ctrl/Cmd+K to run Quarto. (It works, the preview opens, great.)
Make some edits to your document, save. (Most of the time, it does not recompile, in my experience.)
Press Ctrl/Cmd+K to run Quarto. (It works, the preview updates, great.)
Repeat the above steps as you work, many times.
Inspect the VS Code terminal panel to find a large number of forwarded ports, most of which are being used by nothing, because they were all created by quarto CLI runs that have since terminated, but VS Code doesn't know that the port forwarding is no longer needed.
Actual behavior
Lots of forwarded ports, only one of which is actually being used, by the most recent quarto CLI run.
Note that these forwarded ports remain in existence even if VS Code is quit and restarted, because it tries to preserve your last setup. So the only solution I've found is manually closing them one at a time.
Expected behavior
Since it seems like the problem here is that the CLI uses random ports and VS Code is far too accommodating, forwarding as many of them as it needs to (unless you change your settings so that it forwards none of them), the best solution is probably for the Quarto extension for VS Code to get the quarto CLI and VS Code cooperating better. Here are some options for that:
Have the quarto VS Code extension tell the CLI to re-use on subsequent runs whatever random port it used on the first run.
Have the quarto VS Code extension un-forward the port every time a quarto CLI process stops.
Give the quarto VS Code extension a setting to specify the port you want it to use (with a sensible default).
Your environment
IDE: VS Code 1.97.2
OS: Windows 11 Home
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Bug description
As you can see in this discussion thread for the quarto CLI, it creates random ports every time it is run. The problem with this random port process is the workflow listed below, if done in a VS Code dev container, or even just in WSL on Windows. It produces lots of forwarded ports that the VS Code session keeps track of.
Steps to reproduce
.md
format.Actual behavior
Lots of forwarded ports, only one of which is actually being used, by the most recent quarto CLI run.
Note that these forwarded ports remain in existence even if VS Code is quit and restarted, because it tries to preserve your last setup. So the only solution I've found is manually closing them one at a time.
Expected behavior
Since it seems like the problem here is that the CLI uses random ports and VS Code is far too accommodating, forwarding as many of them as it needs to (unless you change your settings so that it forwards none of them), the best solution is probably for the Quarto extension for VS Code to get the quarto CLI and VS Code cooperating better. Here are some options for that:
Your environment
The text was updated successfully, but these errors were encountered: