Open mpf opened 8 months ago
Typically, the preview command will re-use existing instances when it can. It could restart in cases like encountering an error, but that isn't typically expected. Is there a particular document that is causing this?
I'm finding it difficult to reliably reproduce the issue. Does VSCode generate logs that I can view next time this happens, so that I can send something more informative to this thread?
I have the same issue for a revealjs presentation right after I upgraded my Quarto to 1.4.549. I use Quarto through VS Code using the extension and the backend is WSL Ubuntu 20.04.
I found the root of the problem. I had put those lines
format:
revealjs:
theme: [simple, custom.scss]
width: 1900
height: 1080
in the _quarto.yml
instead of the qmd
file and it caused the quarto extension of VS Code to restart the preview each time.
Thanks for the update, @Adam-Antios . Does this mean that we’re not meant to specify format options within _quarto.yml
? It seems a useful way to avoid duplicating format options in every separate qmd
file.
That is what I was aiming for as well! I really don't know what that means. I was thinking it might be a bug of the VS Code Quarto extension, at least in my case.
I've also observed that, on the occasions where the preview doesn't restart, it often jumps to, say, the beginning of the document or some other section unrelated to the current cursor position.
I've given up on quarto preview from within vscode, and now run quarto preview
manually in a terminal using a stand-along browser. This works reliably.
The
Quarto: Preview
command, executed from vscode's command palette, correctly starts and waits for saved changes:But on save, that process is killed (closing the preview), and the preview command is newly executed, which opens a new preview window with a different port. This is inconvenient.
This doesn't occur for all qmd files.
Is this behaviour normal when a file contains particular content? Or is it a bug? If it's the latter, I'd like to help, but would need guidance on what kind of debugging information I might provide.