question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help not shown when using session watcher

See original GitHub issue

Describe 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 Screenshot 2021-05-31 at 13 46 02

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:open
  • Created 2 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
py9mrgcommented, Jun 29, 2022

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.

0reactions
byryepezcommented, Nov 11, 2022

Rhelp_VSCode He there !. I solved the same issue by checking my environmental variables. The steps I followed:

  • I added the bin installation file (C:\R\R-4.1.3\bin in my case, or C:\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.
  • Check if you can start a R console from any terminal by writing r.
  • If that is positive, then in the Rpath settings for the R extension in vscode write r, or in the settings.json: "r.rpath.windows":"r"
  • Restart vscode. Check if the help pages are working.

After and update, I have to change the R version. Hope this helps ! Cheers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Help not shown when using session watcher #659 - GitHub
Describe the bug When using the session watcher, R is not able to find the help files. Without the session watcher, I can...
Read more >
HTTP Session Watcher - DevCentral
Problem this snippet solves: iRule to capture and display HTTP request and response headers (and optionally request payload) for HTTP ...
Read more >
Writing R in VSCode: Interacting with an R session - Kun Ren
The latest vscode-R implements an experimental feature called R session watcher, which makes it possible for VSCode to communicate with any ...
Read more >
Dialog box windows are not displayed in AutoCAD products
Do one of the following: Move the window to a different monitor. Hold down the WINDOWS + SHIFT keys and then press the...
Read more >
Folder not displayed in Workflow Monitor after the session run
This issue occurs when there is any script or user which deletes the log using truncate log command, which cleans up the history...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found