I just started with debugging in rstudio. At the beginning everything worked as described here.
After I used browser()
, I cannot get back to this status, that means there is no interactive field, where I can press the hide traceback
or return with debug
button. Does anybody know, what is going wrong?
traceback()
works but the message is not interactive anymore.options(error = function(){.rs.breakOnError(TRUE)})
from here https://support.rstudio.com/hc/en-us/community/posts/202296047-error-recovery sets the value to TRUE, but still no interactive traceback appears.RStudio Version
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 2.2
year 2015
month 08
day 14
svn rev 69053
language R
version.string R version 3.2.2 (2015-08-14) nickname Fire Safety
Please let me know if you also need all options()
settings.
Edit November 2018: Run a script with an error an interactive traceback active.
getOption("error")
(function ()
{
.rs.recordTraceback(FALSE, 5, .rs.enqueueError)
})()
Destroy interactive traceback (No idea, what I did):
getOption("error")
(function ()
{
.rs.recordTraceback(FALSE, 5, .rs.enqueueError)
})()
Thus, settings are the same and it unclear what happens...
I had the same behavior. After programmatically setting the error
option in R to browser
, traceback
or recover
, the button in RStudio (Debug/On Error) didn't work anymore.
To resolve this I had to first reset the error
option to it's default value NULL
. After that I could get back the interactive debugger.
The following resets the option first to NULL
and then sets the option to the behavior that you get with selecting (Debug/On Error/Error Inspector) in RStudio.
options(error = NULL)
options(error = function(){.rs.recordTraceback(TRUE)})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With