vscode-R: User friendly error message when vsc.rstudioapi is not set
Describe the bug When I want to use an RStudio Addin from VS Code I receive the following error:
Command ‘R: Launch RStudio Addin’ resulted in an error (ENOENT: no such file or directory, open ‘/tmp/RtmpKarM0O/vscode-R/addins.json’)
I set options(vsc.rstudioapi = TRUE) in my radian profile. This works (checked using getOption("vsc.rstudioapi")).
To Reproduce Steps to reproduce the behavior:
- Open VS Code
- Press ‘F1’ to open the command palette
- Choose ‘R: Launch RStudio Addin’
- See error
Do you want to fix by self? (I hope your help!)
No (don’t know how)
Expected behavior I should be able to choose from installed RStudio Addins.
Screenshots

Environment (please complete the following information):
- OS: Linux
- VSCode Version: 1.51.0
- R Version: 4.0.3
- vscode-R version: 1.5.2
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (5 by maintainers)
r.alwaysUseActiveTerminalis mainly used to support sending code to R terminals started by user as introduced at the wiki. It should not have anything to do withrstudioapistuff.If one always starts own R terminals (I always starts radian in a tmux window), then one has to add the source
init.Rcode to the user profile (~/.Rprofile) so that session watcher andrstudioapiemulation could load and attach on each R session startup..radian_profileis only sourced byradianon session startup. If the same code appears in~/.Rprofile, then it should work for all R sessions started with this user profile includingradiansessions, and the same code is not needed in.radian_profile. If you only want some code to run on radian startup (instead of R), then you should write it in.radian_profile.