'R path not working: /usr/local/bin/R (Can be changed in setting r.rpath.XXX)'
See original GitHub issueDescription R Debugger doesn’t see the R executable, even though the correct R path has been given?
To Reproduce
- Install the prerequisites (R, VSCode, the R extension for VSCode)
- Install R Debugger, along with dependencies
- Create a new folder, with a simple R file, test.R, with something like below
- Try to run said code
Your R code
test.R
print(hello world')
a <- 2 + 2
Your Launch config If applicable, the launch config that causes the bug. E.g.:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "R-Debugger",
"name": "Launch R-Workspace",
"request": "launch",
"debugMode": "workspace",
"workingDirectory": "${workspaceFolder}"
},
{
"type": "R-Debugger",
"name": "Debug R-File",
"request": "launch",
"debugMode": "file",
"workingDirectory": "${workspaceFolder}",
"file": "${file}"
},
{
"type": "R-Debugger",
"name": "Debug R-Function",
"request": "launch",
"debugMode": "function",
"workingDirectory": "${workspaceFolder}",
"file": "${file}",
"mainFunction": "main",
"allowGlobalDebugging": false
},
{
"type": "R-Debugger",
"name": "Debug R-Package",
"request": "launch",
"debugMode": "workspace",
"workingDirectory": "${workspaceFolder}",
"includePackageScopes": true,
"loadPackages": [
"."
]
},
{
"type": "R-Debugger",
"request": "attach",
"name": "Attach to R process",
"splitOverwrittenOutput": true
}
]
}
Expected behavior Run
Actual behavior Throws an error
Desktop (please complete the following information):
- OS: Mac OS 12.0 (M1 based)
- R Version: R version 4.1.2 (2021-11-01) – “Bird Hippie”
- vscDebugger Version: vscDebugger_0.4.7
- vscode-r-debugger Version: v0.4.7
Additional context I’m new to VS Code, coming from RStudio, so I may have messed something up here, however, I’ve tried installing it three times now (reinstalling VSCode, with no luck!). Don’t know what I’m doing wrong.
The path to R is the one in the title, I’ve double checked! I’ve added the path to both the rterm and rpath options in settings, and it doesn’t work, nor does removing both. VS Code can see the R binary for the terminal, but the debugger seemingly cannot see it
Issue Analytics
- State:
- Created 2 years ago
- Comments:27 (3 by maintainers)
Yeah, that was the missing link 😃 So, following @eitsupi and using the current R patches from https://mac.r-project.org/ should finally solve the initial issue!
Good and bad news so far: The above issue that R ignores input from stdin when the --interactive flag is set, is still fixed in newer versions of R. You could find these patches (including installer packages) here: https://mac.r-project.org
However, after the installation I got some new problems concerning the R-package “vscDebugger”, which is necessary for debugging. Up to now, this package is not supported by newer R versions. So the installation via install.packages(“vscDebugger”) results in an error:
I think we have to wait until the next official version of R is released…