Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #200
Still some work to be done, but filing now for early feedback, e.g.
trace()
arguments by name, otherwise use(what, code, args)
, which doesn't exactly match what we're used to when usingtrace()
directly. Open to suggestions heretrace()
basically defaults to using.GlobalEnv
to look up objects to be traced, which doesn't play well with the normal approach to writingtestthat
tests -- as seen here, we have to write to.GlobalEnv
to test the default behavior. Feels odd, but also didn't feel right to always supply the unit test environment as an argument. Again, open to suggestions -- probably best is to just add several tests and comments about why they're needed. Or we can try and diverge from thebase::trace()
behavior and always seek to land in the calling environment.R/debug.R
with the thought that eventually we could putwith_debug()
here (or other temp state edits for debugging).