RStudio enters debug mode for every function error - how can I stop it?

Nothing worked for me: I had a function that when I run kept on debugging.

The solution for me was (with caution pls): Debug (menü) -> clear All Breakpoints ...


Well, I think I sort of fixed it. No idea how this happened, but in Rstudio, running

> options()$error # returned:
 (function () 
{
    .rs.breakOnError(FALSE)
})()

Where as in the same thing returned NULL when running R from terminal. --> I ran:

options(error=NULL)

That fixes the problem - but only temporarily. When I quit and restart Rstudio, the code needs to be run again. Will update when I find a way to change the default... Cheers.


I tried fixing this issue by putting options(error = NULL) in my .Rprofile, but this did not work.

What did work was to go to the "Debug" -> "On Error" menu and select "Message only". This effectively is the same as setting options(error = NULL), but it is persistent across restarts.

RStudio menu