@@ -48,25 +48,25 @@ globally-available name (as used here with the `any` function).
48
48
49
49
Now let's see what happens:
50
50
51
- ``` jldoctest demo1; filter = [r"in Base at .*$", r"[^\d]\d\d\d[^\d]"]
51
+ ``` jldoctest demo1; filter = [r"in Base at .*$", r"[^\d]\d\d\d[^\d]", r"(c 1|d 1)" ]
52
52
julia> @interpret sum([1,2,3]) # no element bigger than 4, breakpoint should not trigger
53
53
6
54
54
55
55
julia> frame, bpref = @interpret sum([1,2,5]) # should trigger breakpoint
56
- (Frame for sum(a::AbstractArray; dims, kw...) in Base at reducedim.jl:873
57
- c 1* 873 1 ─ nothing
58
- 2 873 │ %2 = ( $(QuoteNode(NamedTuple)))( )
59
- 3 873 │ %3 = Base.pairs(%2 )
56
+ (Frame for sum(a::AbstractArray; dims, kw...) @ Base reducedim.jl:994
57
+ c 1* 994 1 ─ nothing
58
+ 2 994 │ %2 = $(QuoteNode(Colon()) )
59
+ 3 994 │ %3 = ($(QuoteNode(NamedTuple)))( )
60
60
⋮
61
- a = [1, 2, 5], breakpoint(sum(a::AbstractArray; dims, kw...) in Base at reducedim.jl:873 , line 873 ))
61
+ a = [1, 2, 5], breakpoint(sum(a::AbstractArray; dims, kw...) @ Base reducedim.jl:994 , line 994 ))
62
62
```
63
63
64
64
` frame ` is described in more detail on the next page; for now, suffice it to say
65
65
that the ` c ` in the leftmost column indicates the presence of a conditional breakpoint
66
66
upon entry to ` sum ` . ` bpref ` is a reference to the breakpoint of type [ ` BreakpointRef ` ] ( @ref ) .
67
67
The breakpoint ` bp ` we created can be manipulated at the command line
68
68
69
- ``` jldoctest demo1; filter = [r"in Base at .*$", r"[^\d]\d\d\d[^\d]"]
69
+ ``` jldoctest demo1; filter = [r"in Base at .*$", r"[^\d]\d\d\d[^\d]", r"(c 1|d 1)" ]
70
70
julia> disable(bp)
71
71
72
72
julia> @interpret sum([1,2,5])
@@ -75,12 +75,12 @@ julia> @interpret sum([1,2,5])
75
75
julia> enable(bp)
76
76
77
77
julia> @interpret sum([1,2,5])
78
- (Frame for sum(a::AbstractArray; dims, kw...) in Base at reducedim.jl:873
79
- c 1* 873 1 ─ nothing
80
- 2 873 │ %2 = ( $(QuoteNode(NamedTuple)))( )
81
- 3 873 │ %3 = Base.pairs(%2 )
78
+ (Frame for sum(a::AbstractArray; dims, kw...) @ Base reducedim.jl:994
79
+ c 1* 994 1 ─ nothing
80
+ 2 994 │ %2 = $(QuoteNode(Colon()) )
81
+ 3 994 │ %3 = ($(QuoteNode(NamedTuple)))( )
82
82
⋮
83
- a = [1, 2, 5], breakpoint(sum(a::AbstractArray; dims, kw...) in Base at reducedim.jl:873 , line 873 ))
83
+ a = [1, 2, 5], breakpoint(sum(a::AbstractArray; dims, kw...) @ Base reducedim.jl:994 , line 994 ))
84
84
```
85
85
86
86
[ ` disable ` ] ( @ref ) and [ ` enable ` ] ( @ref ) allow you to turn breakpoints off and on without losing any
@@ -109,20 +109,20 @@ julia> break_on(:error)
109
109
110
110
julia> fr, pc = @interpret f_outer()
111
111
before error
112
- (Frame for f_outer() in Main at none:1
112
+ (Frame for f_outer() @ Main none:1
113
113
1 2 1 ─ Base.println("before error")
114
114
2* 3 │ f_inner()
115
115
3 4 │ %3 = Base.println("after error")
116
116
4 4 └── return %3
117
- callee: f_inner() in Main at none:1, breakpoint(error(s::AbstractString) in Base at error.jl:35, line 35, ErrorException("inner error")))
117
+ callee: f_inner() @ Main none:1, breakpoint(error(s::AbstractString) @ Base error.jl:35, line 35, ErrorException("inner error")))
118
118
119
119
julia> leaf(fr)
120
- Frame for error(s::AbstractString) in Base at error.jl:35
120
+ Frame for error(s::AbstractString) @ Base error.jl:35
121
121
1 35 1 ─ %1 = ($(QuoteNode(ErrorException)))(s)
122
122
2* 35 │ %2 = Core.throw(%1)
123
123
3 35 └── return %2
124
124
s = "inner error"
125
- caller: f_inner() in Main at none:1
125
+ caller: f_inner() @ Main none:1
126
126
127
127
julia> typeof(pc)
128
128
BreakpointRef
@@ -154,7 +154,7 @@ julia> @interpret myfunction(1, 2)
154
154
6
155
155
156
156
julia> @interpret myfunction(5, 6)
157
- (Frame for myfunction(x, y) in Main at none:1
157
+ (Frame for myfunction(x, y) @ Main none:1
158
158
⋮
159
159
3 4 │ %3 = x > 3
160
160
4 4 └── goto #3 if not %3
@@ -165,7 +165,7 @@ b 5* 4 2 ─ nothing
165
165
x = 5
166
166
y = 6
167
167
b = 2
168
- a = 1, breakpoint(myfunction(x, y) in Main at none:1, line 4))
168
+ a = 1, breakpoint(myfunction(x, y) @ Main none:1, line 4))
169
169
```
170
170
171
171
Here the breakpoint is marked with a ` b ` indicating that it is an unconditional breakpoint.
0 commit comments