Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with_debug? #171

Open
MichaelChirico opened this issue Jun 14, 2021 · 2 comments
Open

with_debug? #171

MichaelChirico opened this issue Jun 14, 2021 · 2 comments
Labels
feature a feature request or enhancement

Comments

@MichaelChirico
Copy link
Contributor

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!

@jimhester
Copy link
Member

I guess you could also use debugonce for this

@MichaelChirico
Copy link
Contributor Author

I guess that example was bad... the use case is more like

with_debug(foo, bar())

where bar() may call foo() several times

@hadley hadley added the feature a feature request or enhancement label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants