withr
withr copied to clipboard
with_debug?
It could be helpful for interactive / debugging usage to have a with_debug
that runs undebug
on exit.
Mock usage:
withr::with_debug(lm, lm(y ~ x))
If that's in scope I'd be happy to file a PR!
I guess you could also use debugonce
for this
I guess that example was bad... the use case is more like
with_debug(foo, bar())
where bar() may call foo() several times