Repository navigation
Canonical data viewer and plot integration still open in external R windows with vscode-R 3.0.0 #1794
Description
Activity
I can reproduce on macOS with a few specific steps.
- Open a directory in VS Code - be sure there are no active terminals.
- Create an R terminal
r.createRTerm.[sess] Connected to VS Codeshould be printed.View()andplot()should work as expected.
- Quit VS Code without closing the active R terminal. Or swap to a different directory
workbench.action.openRecent(ctrl + r) without closing the active R terminal. - Open VS Code again or ctrl + r back to the original directory,
sessshows an IPC error.
- Run the same commands as earlier. Now, XQuartz pops up instead.
For me, I can fix by killing that old terminal and then making a new R terminal. Running the same commands shows the intended
Viewer.@leanhdung1994 interestingly I cannot reproduce this on Windows. Do you have
sessinstalled?@grcatlin I followed your first two steps and encountered an error
Yes,
sessis already installed in my laptopI have run some commands for diagnostics
+ # Environment variables the extension set + # Environment variables the extension set + Sys.getenv()[grep("^SESS_|^JGD_", names(Sys.getenv()))] + + # Discovery file: exists? contents? + f <- Sys.getenv("SESS_DISCOVERY_FILE") + file.exists(f) + cat(readLines(f, warn = FALSE), sep = "\n") + + # Does the pipe from the discovery file exist? (copy the pipe name from its "endpoint") + "vscode-r-7405fda80815652a" %in% list.files("//./pipe/") + + # The failing call, with a full traceback + sess::connect() + warnings() [1] "R version 4.6.1 (2026-06-24 ucrt)" R version 4.6.1 (2026-06-24 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 11 x64 (build 26200) Matrix products: default LAPACK version 3.12.1 locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 LC_NUMERIC=C [5] LC_TIME=English_United States.utf8 time zone: Europe/Paris tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_4.6.1 sess_3.0.0 [1] ‘3.0.0’ [1] "C:/Users/Akira/AppData/Local/R/win-library/4.6/sess" [1] "C:/Users/Akira/AppData/Local/R/win-library/4.6" "C:/Program Files/R/R-4.6.1/library" JGD_SOCKET npipe:////./pipe/jgd-04d758d0918964ab SESS_DISCOVERY_FILE c:\Users\Akira\AppData\Roaming\Code\User\globalStorage\reditorsupport.r\sessions\fd1f53a255694fe950e22098cf1fc185.json SESS_PLOT_BACKEND auto SESS_RSTUDIOAPI TRUE [1] TRUE {"version":1,"endpoint":"\\\\.\\pipe\\vscode-r-7405fda80815652a","jgdSocket":"npipe:////./pipe/jgd-04d758d0918964ab","terminalPid":24284} [1] TRUE Warning message: In sess::connect() : [sess] Connection info not available. Cannot connect to VS Code. Warning message: In sess::connect() : [sess] Connection info not available. Cannot connect to VS Code.
Two qq:
- Did you test against the RC (dev) version of the extension previously? There's a potential
sessversion mismatch that might be triggering this issue. Regardless, can you try installingsessfrom R-universe to see if that fixes the issue? See https://github.com/REditorSupport/vscode-R/tree/main/sess#installation - Can you share your R-specific VS Code user settings?
Reacted by leanhdung1994- Did you test against the RC (dev) version of the extension previously? There's a potential
Two qq:
- Did you test against the RC (dev) version of the extension previously? There's a potential
sessversion mismatch that might be triggering this issue. Regardless, can you try installingsessfrom R-universe to see if that fixes the issue? See https://github.com/REditorSupport/vscode-R/tree/main/sess#installation - Can you share your R-specific VS Code user settings?
Thank you very much for your help. Installing
sessfrom R-universe solves the problem for me
- Did you test against the RC (dev) version of the extension previously? There's a potential
Excellent, thanks for confirming!
@randy3k maybe we should release a fake v3.0.1 patch version for both vscode-R and
sessto head this off?@grantmcdermott should I open a separate issue or discussion on my earlier comment regarding how I was able to break
sesson MacOS? #1794 (comment)@grcatlin If the r-universe install didn't fix it, then yes please open it as a separate issue.
Reacted by Garrett Catlin- added a commit that references this issue
on Oct 4, 2026
Environment
Problem
The VS Code-R session integration does not seem to be working correctly. In particular:
View(df)opens the native R data viewer in a separate Windows window instead of opening the data frame in the VS Code data viewer.plot(...)opens a separate nativeR Graphicsdevice window instead of displaying the plot inside VS Code.This seems to indicate that the R session watcher/session integration is still not attaching correctly.
Steps to reproduce
For example, run: