Consider we have called debug()
for several functions to make a breakpoint on them. When we find and solve the bug, is there anyway to undebug()
all functions already marked by debug()
by a single command?
Here is a good benchmark to see if your proposed method really works perfectly:
> library(limma) # bioconductor
> debug(read.ilmn)
> read.ilmn("a.txt") # No problem if this file does not exist
Browse[2]> debug(.read.oneilmnfile) # This is the debug browser for read.ilmn()
Browse[2]> Q # To exit debug browser
> undebug.all() # Here run your proposed function to undebug everything!
> read.ilmn("a.txt")
# Now if the debug browser is not started, you are lucky to pass this test!
You may see the accepted answer below. Any case for which this answer does not work, or cleaner versions, are more than welcome.