JuliaDebug / Debugger.jl Public
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
don't run recursive interpretation unless there is a chance of breaking #89
Conversation
Codecov Report
@@ Coverage Diff @@
## master #89 +/- ##
==========================================
+ Coverage 83.2% 83.33% +0.12%
==========================================
Files 7 7
Lines 399 402 +3
==========================================
+ Hits 332 335 +3
Misses 67 67
Continue to review full report at Codecov.
|
| @@ -37,10 +37,17 @@ function show_breakpoint(io::IO, bp::BreakpointRef) | |||
| println(io) | |||
| end | |||
|
|
|||
| const always_run_recursive_interpret = Ref(false) | |||
| no_chance_of_breaking() = isempty(JuliaInterpreter._breakpoints) && !JuliaInterpreter.break_on_error[] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use JuliaInterpreter.breakpoints() here?
Might also make sense to check if the breakpoints are actually enabled:
function no_chance_of_breaking()
bps = JuliaInterpreter.breakpoints()
!JuliaInterpreter.break_on_error[] && (isempty(bps) || all(bp -> !bp[].isactive, bps))
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use JuliaInterpreter.breakpoints() here?
It does a copy, which I don't really need. But of course, that copy doesnt matter and might as well use the official API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might also make sense to check if the breakpoints are actually enabled:
Good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but that's not the third or so function that lives in Juno and Debugger. Maybe we should think about moving those upstream (or into DebuggerUtils.jl :P).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I think some code duplication is fine.
|
Shouldn't this logic be in JuliaInterpreter? That way Juno and Rebugger get it too. |
|
Yeah, that is very true. |
|
Will move. |


If someone is just stepping, we might as well use compiled mode like back in the days.
Does this makes sense to you @timholy?