Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to end a 'debug' mode? [duplicate]

In RStudio, I started a debug mode by

debug(ls) ls() 

Then I do not know how to end this mode. The prompt changed to

Browse[2]> 

How can I end this debugging mode?

like image 903
user67275 Avatar asked Apr 28 '14 23:04

user67275


People also ask

How do I stop debug mode?

To exit debug mode, press Alt+B followed by D. at the Command Prompt to exit debug mode.

How do I exit debug mode in r?

Q to stop debug mode, terminate the function, and return to the R prompt.


2 Answers

First quit debugging the function with Q at the Browse[2]> prompt as jbaums tells you in his comment. This takes you back to the > prompt. Now turn off the debugging on ls with this command:

undebug(ls) 

?debug is helpful for this sort of thing.

like image 78
Matthew Lundberg Avatar answered Oct 01 '22 18:10

Matthew Lundberg


Use debugonce() instead of debug(). As the name suggests, this will only take the function through debug mode once. When in debug mode hit continue to run through the end or the next breakpoint or use the stop button to end the debug session.

like image 41
sriramn Avatar answered Oct 01 '22 18:10

sriramn