quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
280 stars 19 forks source link

Plots stop working after knitting a .qmd #450

Open kebb549575 opened 1 month ago

kebb549575 commented 1 month ago

I recently installed the Quarto extension in VS Code and have noticed that plot() and View() won't work from an R terminal after I have knit a .qmd document. When I knit a .qmd document I notice that neither the current Quarto terminal, nor the current R terminal are attached to my VS Code session (the .qmd knits fine though):

R Terminal Won't Attach

I should be able to "click to attach" as shown in the image, or issue the command .vsc.attach() to attach the R terminal, but this does not work. The terminals won't attach. As a workaround I've discovered I can open a new R terminal in VS Code that will automatically attach itself to my VS Code session, then close any other terminal instances of R, and then magically the Quarto terminal will attach itself to my current VS Code session and I am able to plot() and View() again from the R terminal.

After knitr creates my Quarto document why won't the Quarto terminal attach itself to R?

Environment