Possibility to run R script with breakpoints
See original GitHub issue- VSCode Version: Version: 1.27.2
- VSCode-R Version: 0.6.1
- OS Version: Ubuntu 16.04 LTS
Steps to Reproduce: None
Do you want to fix by self? (I hope your help!)
No
(If yes,) what kind of help do you want? (e.g. Which file should I fix, Survey (related documents) This is not bug report. I that possible to run R in debug mode with breakpoints? If not could you be so kind to add this feature?
(If related)setting.json
// R.exe path for windows
"r.rterm.windows": "C:\\Program Files\\R\\R-3.4.4\\bin\\x64\\R.exe",
// R path for Mac OS X
"r.rterm.mac": "/usr/local/bin/R",
// R path for Linux
"r.rterm.linux": "/usr/bin/R",
// R command line options (i.e: --vanilla)
"r.rterm.option": [],
// An optional encoding to pass to R when executing the file, i.e. 'source(FILE, encoding=ENCODING)'
"r.source.encoding": "UTF-8",
// Keeping focus when running
"r.source.focus": "editor",
Thanks for attention to my message and have a nice day.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:21 (14 by maintainers)
Top Results From Across the Web
Possibility to run R script with breakpoints · Issue #89 - GitHub
R's native debugger works in pure command line. When you call browser() in any part of your code, the interpreter enters a browser...
Read more >Chapter 11 Debugging R code
First you can set an editor breakpoint by clicking to the left of the line number in the source file, or by pressing...
Read more >22 Debugging | Advanced R - Hadley Wickham
In RStudio, you can set a breakpoint by clicking to the left of the line number, or pressing Shift + F9 . Breakpoints...
Read more >Debugging with the RStudio IDE - Posit Support
If you have the .R file corresponding to the code you want to debug, it's easy to use editor breakpoints or browser() to...
Read more >How to step through an R script from the beginning?
Create a new R script ( ctrl+shift+n ) · Enter code in the file · Set a break point by. a) clicking left...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve been working on an R debugger recently, following the same approach as @renkun-ken described. Since this approach is quite different from the current R extension, I decided to do so in a new project. If you have the time to try the debugger, I would appreciate any feedback 😃
https://github.com/ManuelHentschel/VSCode-R-Debugger https://github.com/ManuelHentschel/vscodeRPackage
The extension doesn’t give you the full debugging capabilities built into VS Code, but you can always add a
browser()
call to your script and you will be R’s debug mode in the interactive terminal when you reach that point in the script.