question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:21 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
ManuelHentschelcommented, May 18, 2020

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

1reaction
jacob-longcommented, Sep 20, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found