Refuse browser call with a twist

Imagine you are debugging a function inside a function. You will be at level 2 ( Browser [2]). Is there a way to exit level 2 and go to level 1? Qwill get you out of any debugging, so I'm looking for something that just comes out of the current level.

+5
source share
2 answers

If you can go to the body of a level 2 function, try to make a mistake. Then set the error parameter to recover. Now you can move between functions as you like.

foo <- function() bar()
bar <- function() stop("start debug here")

options(error = recover)
foo()
+2
source

c , ? 1. , , , 2, , 1 ?

+2

All Articles