Declare that we are in debug mode if any frame is marked with RDEBUG
#346
+46
−9
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.
Addresses posit-dev/positron#2310 enough for public beta, I think
The biggest win here is that we no longer leave "debug mode" when a frame gets added to the stack that isn't marked with
RDEBUG, which was horribly confusing because R is still in the browser but you can't click "next" using the UI, you have to go down and type it in the console to continue.This approach technically gives an "accurate" view of the frame you are in, but it isn't particularly useful with these cases (lazy eval of args and extra try-catch frames) as you will see in the videos. I also tried the idea of dropping the non-debug frames, but that ends up being just as confusing, so I think that this simpler approach of showing everything that R tells you is on the stack (even if some are not debug frames) is probably good enough for now - this way also preserves the ability to look at the stack in the bottom left and click your way up the stack of tryCatch internals if you want to.
force.mov
try-catch.mov
adds-frames.mov