Help not shown when using session watcher
See original GitHub issueDescribe the bug
When using the session watcher, R is not able to find the help files. Without the session watcher, I can see the help fine. Plotting and running View()
work fine with the session watcher too as they open in a webview, the problem is with the help only.
To Reproduce I don’t understand what is happening, because some times it works, sometimes it doesn’t… but most of the time it doesn’t.
Expected behavior
When running help(function)
or ?function
, it should show the help on this function in a webview panel, but right now it shows an error (see screenshot) Couldn't show help for path: /library/graphics/html/<function>.default.html
Screenshots
Do you want to fix by self? I could help if I knew what to do…
My setting.json
// R path for Mac OS X
"r.rterm.mac": "/Library/Frameworks/Python.framework/Versions/3.9/bin/radian",",
// R command line options (i.e: --vanilla)
"r.rterm.option": ["--no-save", "--no restore"],
// An optional encoding to pass to R when executing the file, i.e. 'source(FILE, encoding=ENCODING)'
"r.source.encoding": "UTF-8",
// Keeping focus when running
"r.source.focus": "editor",
// Use active terminal for all commands, rather than creating a new R terminal
"r.alwaysUseActiveTerminal": false,
// Use bracketed paste mode
"r.bracketedPaste": true,
// Enable R session watcher (experimental)
"r.sessionWatcher": true,
My .Rprofile:
options(vsc.plot = FALSE)
options(vsc.browser = "Beside")
options(vsc.viewer = "Beside")
options(vsc.page_viewer = "Beside")
options(vsc.view = "Beside")
options(vsc.helpPanel = "Beside")
Environment (please complete the following information):
- OS: macOS 11.3
- VSCode Version: Version: 1.56.2 (Universal) Commit: 054a9295330880ed74ceaedda236253b4f39a335
- R Version: 4.1
- vscode-R version: 1.6.8
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (6 by maintainers)
Hello all,
I am having a similar problem since I upgraded to R 4.2.1 (on Windows).
With session watcher enabled I get the “Couldn’t show help path” error when using something like
?plot
in the terminal. And all of the help features in the R pane return the same / similar path errors. If I disable session watcher, the pane features still don’t work and I get nothing with?plot
.I am using radian and it doesn’t work whether I set the rterm option or not.
.libPaths()
returns the right system and user paths for the library. Clearing the cache doesn’t work - seems to hang. Global .Rprofile.The main difference for me is that it seems to affect all workspaces.
Any ideas? Maybe a permissions thing?
Edit: forgot to say - very similar to #752 as well, except I’m on standard vscode no vscodium.
Edit 2: I’ve also noticed that since the upgrade to R 4.2.1, none of the lintr functionality is working. Seems like maybe there’s a permissions issue or something with R in the background? I tried adding R to path in environment variables, but nothing. I wonder if whatever they had in vscodium that caused the issue in #753 has now made its way to vscode?
Edit 3: I’m a complete moron. I forgot to update Rpath setting! Usually I don’t as it sorts itself out automatically but the last R upgrade I had to set it (and Rterm option, the
--binary=etc
) for some reason to get everything working. I updated Rterm option this time, but forgot Rpath. Ignore me. FWIW, everything now works again without setting either Rterm option or Rpath. Not sure what about my R 4.2.0 installation caused the initial hiccup.C:\R\R-4.1.3\bin
in my case, orC:\Program Files\R\R-4.1.3\bin
) to the path in my user environmental variables. If you have an admin account, then you have to add the bin folder to the system environmental variables.r
."r.rpath.windows":"r"
After and update, I have to change the R version. Hope this helps ! Cheers.