'Why am I unable to use [R] with VS Code?
Problem: I cannot get the R interpreter to run inside of VS Code on Windows 10. I keep getting errors, like "R:(not attached)". Here is what I tried to fix the problem myself:
I tried uninstalling both visual studio code and my installation of R (v 4-1.0). I then used CCleaner Professional to cleanup my registry. I restarted my machine. I then reinstalled R-4.1.0 accepting all of the default choices (especially writing the version number to the registry). Next, I installed the package languageserver. I then re-installed VS Code (latest stable version). I tried installing vscDebugger, but I received an error stating that it is not available for this version of R. Within VS Code, I tried running the command R Debugger: Update or install the required R package. When I invoke the procedure, it throws an error indicating that --no-restore is not recognized and is an unexpected token. Here is the code and error Visual Studio Code generates when I execute R Debugger: Update or install the required R package.
PS C:\Users\Dad\Documents\Learn++\Projects\AdvancedR> "C:\Program Files\R\R-4.1.0\bin\x64\R.exe" --no-restore --quiet -f "c:\Users\Dad.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"
"At line:1 char:52
- "C:\Program Files\R\R-4.1.0\bin\x64\R.exe" --no-restore --quiet ...
-
~~~~~~~~~~
Unexpected token 'no-restore' in expression or statement. At line:1 char:1
- "C:\Program Files\R\R-4.1.0\bin\x64\R.exe" --no-restore --quiet ...
-
The '--' operator works only on variables or on properties. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken ge`:"
I do not know what to try next to get the R interpreter to work with VS Code. Any suggestions?
Solution 1:[1]
Tried to install it from vsc extension menu just search R then install it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | elandil2 |
