In Rstudio console, I ran the following commands
> debug(ls)
> ls()
Then, I could not quit/leave the debug mode. I tried the following:
1, "Q" + "enter key" 2, "c" + "enter key" 3. the red "Stop" button.
but it does not leave debug mode.
Browse[2]> Q
debugging in: ls(.Internal(getNamespaceRegistry()), all.names = TRUE)
debug: {
if (!missing(name)) {
Error: unable to quit when browser is active
Browse[2]> c
exiting from: ls(.Internal(getNamespaceRegistry()), all.names = TRUE)
debugging in: ls(.Internal(getNamespaceRegistry()), all.names = TRUE)
debug: {
if (!missing(name)) {
.....
The Rstudio version: Version 0.98.1060 – © 2009-2013 RStudio, Inc.
The R version: R i386.3.1.1
Has anyone had this issue in Rstudio? Thanks. Ang
To exit debug mode, press Alt+B followed by D. at the Command Prompt to exit debug mode.
Go to the "Sources" tab. At the top right hand side, toggle the button that looks like the pause symbol surrounded by a hexagon (button on the far right) until the color of the circle turns black to turn it off. If the pause symbol isn't blue it may be that you've accidentally marked a line for debugging inspection.
Save this answer. Show activity on this post. The help page ? browser says that typing c and hitting enter will get you out of the browser and let the function continue to run or typing Q and hitting enter will exit the browser and the function and take you back to the top-level prompt.
Debugging is the process of finding and fixing errors within a script. All modern browsers and most other environments support debugging tools – a special UI in developer tools that makes debugging much easier. It also allows to trace the code step by step to see what exactly is going on.
The problem is that as soon as you leave debug mode, something is triggering a call to ls
, which puts you back in debug mode. To fix the issue, turn off debugging for ls
before you leave the debugger:
Browse[2]> undebug(ls)
Browse[2]> Q
Consider using debugonce
rather than debug
to avoid getting into these kinds of loops.
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