|
27 | 27 | BreakpointRef(framecode, stmtidx) = BreakpointRef(framecode, stmtidx, nothing)
|
28 | 28 |
|
29 | 29 | function Base.show(io::IO, bp::BreakpointRef)
|
30 |
| - lineno = linenumber(bp.framecode, bp.stmtidx) |
31 |
| - print(io, "breakpoint(", bp.framecode.scope, ", ", lineno, ')') |
| 30 | + if checkbounds(Bool, bp.framecode.breakpoints, bp.stmtidx) |
| 31 | + lineno = linenumber(bp.framecode, bp.stmtidx) |
| 32 | + print(io, "breakpoint(", bp.framecode.scope, ", ", lineno) |
| 33 | + else |
| 34 | + print(io, "breakpoint(", bp.framecode.scope, ", %", bp.stmtidx) |
| 35 | + end |
| 36 | + if bp.err !== nothing |
| 37 | + print(io, ", ", bp.err) |
| 38 | + end |
| 39 | + print(io, ')') |
32 | 40 | end
|
33 | 41 |
|
34 | 42 | const _breakpoints = BreakpointRef[]
|
@@ -59,7 +67,7 @@ function shouldbreak(frame, pc=frame.pc[])
|
59 | 67 | isassigned(frame.code.breakpoints, idx) || return false
|
60 | 68 | bp = frame.code.breakpoints[idx]
|
61 | 69 | bp.isactive || return false
|
62 |
| - return bp.condition(frame)::Bool |
| 70 | + return Base.invokelatest(bp.condition, frame)::Bool |
63 | 71 | end
|
64 | 72 |
|
65 | 73 | function prepare_slotfunction(framecode::JuliaFrameCode, body::Union{Symbol,Expr})
|
|
0 commit comments