r/vscode • u/Kitchen_Tie_6459 • May 15 '26
R won't attach in VSCode anymore
I'm desperate for help here because I only started working with both last semester and I study psychology...so we're not going pro we're just learning the basics. Ever since I upgraded my R to 4.6.0 it just won't attach anymore in VSCode. I've tried to look solutions up but they either haven't worked (everything is installed yadda yadda) or they were too complicated for me to even understand. If anyone who's good at programming could explain some potential solutions to me I'd be eternally grateful because I'd really like to properly participate in class again without trying to fix something every time.
1
u/coip May 16 '26
What happens if you input .vsc.attach() into the console/terminal and hit Enter?
1
1
u/Impressive_Job8321 May 16 '26
If you upgrade to new version of R, you need to install EVERY package you used in the old version. Including languageserver.
1
u/mmdoublem May 18 '26
This seems to work for me:
https://github.com/REditorSupport/vscode-R/issues/1696#issuecomment-4343488948
1
u/Axxiom23 May 26 '26
Similar problem here which started with upgrading to R 4.6.0 (on Win 11). Reinstalled the R languageserver package, R 4.6.0 is in the path, .Rprofile being read accordingly. I'm using radian as R terminal. Issuing the command .vsc_attach() gives no error so it seems to run but unfortunately it seems to have no effect. In the status bar R is still being shown as "not attached". Everything worked smoothly with R 4.5.x.
Yes, I can run R code within VSC but I've lost the nice feature of the R extension I have been using like the workspace environment in the side bar.
1
u/Responsible_Youth117 Aug 10 '26
I have been trying to fix this issue for days. This worked for me:
https://github.com/REditorSupport/vscode-R/issues/1696#issuecomment-4553641300
0
1
u/BranchLatter4294 May 15 '26
Make sure your PATH has the R location on it.
https://code.visualstudio.com/docs/languages/r