r-lib/withr

with_trace()?

Opened this issue · 1 comments

Debugging some unit tests and trying to get a function to print some state -- I'm running trace(); on.exit(untrace()) now but of course that's more natural as withr::local_trace(...).

Is there a technical limitation to trace() running in a withr::defer-like setup?

Happy to try and file a PR.

That seems like a good idea, and a PR would be great.