Skip to content

Commit 367e7cb

Browse files
committed
Run breakpoint functions with invokelatest
If a new breakpoint is defined and then called before returning to toplevel, you otherwise get a "method may be too new" error.
1 parent c96caa9 commit 367e7cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/breakpoints.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function shouldbreak(frame, pc=frame.pc[])
6767
isassigned(frame.code.breakpoints, idx) || return false
6868
bp = frame.code.breakpoints[idx]
6969
bp.isactive || return false
70-
return bp.condition(frame)::Bool
70+
return Base.invokelatest(bp.condition, frame)::Bool
7171
end
7272

7373
function prepare_slotfunction(framecode::JuliaFrameCode, body::Union{Symbol,Expr})

0 commit comments

Comments
 (0)