【问题标题】:Unable to debbug R code on VSC running on Windows无法在 Windows 上运行的 VSC 上调试 R 代码
【发布时间】:2022-01-24 19:41:29
【问题描述】:

我已经为在 Windows 上运行的 VSC 安装了以下扩展:R、R 调试器和 R 工具,但是,当我尝试调试一些 R 代码时,我收到以下消息:Please install the R package: "vscDebugger"

我曾尝试使用install.packages("vscDebugger", repos="http://cran.us.r-project.org") 安装它,但失败了。

这是我的 launch.json

{
    // 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
        }
    ]
}

我得到所有选项的错误。

【问题讨论】:

    标签: r visual-studio-code


    【解决方案1】:

    我发现解决办法是执行这个命令:"\Program Files\R\R-4.1.2\bin\R.exe" --no-restore --quiet -f "c:\Users\hugo.villalobos\.vscode\extensions\rdebugger.r-debugger-0.4.7\R\install.R" --args "https://github.com/ManuelHentschel/VSCode-R-Debugger/releases/download/v0.4.7/vscDebugger_0.4.7.zip"

    【讨论】:

      猜你喜欢
      • 2022-01-24
      • 1970-01-01
      • 2018-03-21
      • 1970-01-01
      • 2021-03-11
      • 2013-07-22
      • 2016-07-24
      • 1970-01-01
      • 2015-07-11
      相关资源
      最近更新 更多