Repository navigation
Resume in the catch block after breaking on a caught exception - #428
Open
KristofferC wants to merge 1 commit into
Open
KristofferC wants to merge 1 commit into
KristofferC wants to merge 1 commit into
Conversation
With `break_on(:throw)`, the debugger stops at every throw, including throws that the code catches. After such a stop, every stepping command was refused with "Cannot step after breaking on error", so the session could only be quit. When an interpreted frame catches the exception the session stopped for, a stepping command now unwinds into that handler (`JuliaInterpreter.unwind_exception`): `c` continues from there, the other commands stop at the start of the `catch` block. Stepping after an uncaught error is still refused. The exception is kept in the new `DebuggerState` field `error_stopped_for`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With
break_on(:throw)(bp on throw), the debugger stops at every throw, including throws the code catches. After such a stop every stepping command was refused with "Cannot step after breaking on error", so the only option was to quit the session:Now, when an interpreted frame catches the exception the session stopped for, a stepping command unwinds into that handler with
JuliaInterpreter.unwind_exception:ccontinues from the handler (in the example: on to the throw for"b", then to the end),catchblock.Stepping after an uncaught error is still refused. The exception is kept in a new
DebuggerStatefield,error_stopped_for.unwind_exceptionexists in all supported JuliaInterpreter versions.Tests: continuing past caught throws (fails without the change), and the refusal after an uncaught error.
🤖 Generated with Claude Code