blog_tips
blog_tips copied to clipboard
How not to be lost with VSCode when coming from RStudio? · StatnMap
How not to be lost with VSCode when coming from RStudio? · StatnMap
A few days exploring VSCode possibilities after multiple years developing with RStudio
https://statnmap.com/2021-10-09-how-not-to-be-lost-with-vscode-when-coming-from-rstudio/
This new blog post allows me to test comments with Utterances as presented in Maelle Salmon blog post there: https://masalmon.eu/2019/10/02/disqus/
This allows you to comment with a GitHub account as comments will be listed in an issue in my blog_tips GitHub repository: https://github.com/statnmap/blog_tips
Let's see if it works !
Thank you for this excellent post Sebastian! I've been actively using VS-Code in most of my open-source R development livestreams and you have some great gems here that I didn't realize (such as the path autocomplete plugin). While I haven't quite achieved as seamless of a debugging experience as in RStudio, I very much agree that VS-Code shines with my container-made dev environment and especially as I integrate R with python or custom javascript. The recent enhancements to R-markdown compilation have been huge for the extension and can't wait to see what the future holds.
Thanks for this great post! I recently switched from RStudio to VS Code. There was no special need, but after working with VS Code for ~2 weeks, I really feel comfortable and won't go back, even not for my casual daily R stuff.
I think some information is outdated, like code-autocompletion worked out-of-the-box for me (after installing the R extension), And I'd suggest the "Path Autocomplete" extension, which is said to work a bit more reliable. Exploring code of functions works with F12.
I have also saved some references/links to resources and settings, and some short guides how to use VS Code or do debugging here: https://gist.github.com/strengejacke/82e8d7b869bd9f961d12b4091c145b88
Though debugging packages does not work with breakpoints (for me), but with browser() instead, my experience is that debugging is more robust in VS Code than in RStudio.
instead, my experience is that debugging is more robust in VS Code than in RStudio.
I'm definitely interested in your debugging workflow in normal (non-package) projects. Could you share a bit more about your setup for debugging?
I haven't used the debugger in non-package projects yet, but I guess it would be easier because you can use breakpoints. That's fairly easy because you simply set a breakpoint and source the file, and it works. I think you only need to configure the launcher.
This is how I do this in projects. You may look at the video, but in the beginning of the video, configuring the launcher is a bit more complicated than described in my "tutorial": https://gist.github.com/strengejacke/82e8d7b869bd9f961d12b4091c145b88?permalink_comment_id=4259875#gistcomment-4259875