I've been using RStudio for years, and this has never happened to me before. For some reason, every time a function throws an error, RStudio goes into debug mode (I don't want it to). Even after using undebug() on a single function.
> undebug(http.get) Warning message: In undebug(fun) : argument is not being debugged > x = http.get(country = 'KE') http --timeout=60 get "http://[email protected]/observation?country=KE" > freshobs.json </dev/null Error in fromJSON(file = "freshobs.json") : unexpected character 'O' Error in el[["product_name"]] : subscript out of bounds Called from: grepl(el[["product_name"]], pattern = "json:", fixed = T) Browse[1]> Q
Any function I use that breaks causes debug mode to start - which is pretty annoying because it opens up a source viewer and takes you away from your code. Anybody know how to stop this functionality? This happens when the 'Use debug mode only when my code contains errors' check box in Preferences is and is not checked.
Thanks!
The R function browser() halts execution and invokes an environment browser when it is called. You can put browser() anywhere in your code to stop at that point in the code for debugging.
To disable USB Debugging mode: Go to Settings and scroll to the System section (on Android 8 and above, go to Settings > System) Tap Developer Options. Tap the button to toggle developer options Off.
To enable or disable Just My Code in Visual Studio, under Tools > Options (or Debug > Options) > Debugging > General, select or deselect Enable Just My Code.
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.
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