Skip to content

'R path not working: /usr/local/bin/R (Can be changed in setting r.rpath.XXX)' #155

@tvqt

Description

@tvqt

Description
R Debugger doesn't see the R executable, even though the correct R path has been given?

To Reproduce

  1. Install the prerequisites (R, VSCode, the R extension for VSCode)
  2. Install R Debugger, along with dependencies
  3. Create a new folder, with a simple R file, test.R, with something like below
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions