REditorSupport / REditorSupport/vscode-R

I can't attach any R session to VS Code when using a remote server via SSH and it can't find the binary either.

Open
#946 21 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

I am using a conda virtual environment for a research project conducted at a remote server which I access via SSH.

I use the [Remote SSH] (https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension to connect to the host and then I need to edit R files there. The code below shows that both R and radian are correctly set, I believe:

(r_conda) [rgr6291@klc0201 bin]$ conda env list
# conda environments:
#
fomc                     /home/rgr6291/.conda/envs/fomc
r_conda               *  /home/rgr6291/.conda/envs/r_conda
rfe_paper                /home/rgr6291/.conda/envs/rfe_paper
base                     /software/python-anaconda3/2019.10

(r_conda) [rgr6291@klc0201 bin]$ which R
~/.conda/envs/r_conda/bin/R
(r_conda) [rgr6291@klc0201 bin]$ which radian
~/.conda/envs/r_conda/bin/radian

In the settings for the R extension, I have set these binaries as the RPath and the Rterm:

{
    "r.rpath.linux": "~/.conda/envs/r_conda/bin/R",
    "r.rterm.linux": "~/.conda/envs/r_conda/bin/radian"
}

However, I get errors like this one when I try to attach an R session:

Cannot find R client at ~/.conda/envs/r_conda/bin/radian. Please check r.rterm setting.

And also it complains that it can't find the jsonlite package although it has been installed:

Failed to get list of R functions. Make sure that jsonlite is installed and r.rpath.linux points to a valid R executable.

What am I missing here?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the attach flow through Remote SSH with the conda paths configured in r.rpath.linux and r.rterm.linux. Check how the extension discovers R and radian in that environment, then verify the jsonlite lookup; done means an R session attaches remotely and the extension can find the executable and package.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.