-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
If I try to debug a function that I'm also timing using TimerOutputs, only lowered code is displayed, and I cannot step normally through the function.
MWE:
julia> using TimerOutputs
julia> using Debugger
julia> my_timer = TimerOutput()
────────────────────────────────────────────────────────────────────
Time Allocations
─────────────────────── ────────────────────────
Tot / % measured: 91.5ms / 0.0% 4.68MiB / 0.0%
Section ncalls time %tot avg alloc %tot avg
────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────
julia> @timeit my_timer foo() = begin
println("hello")
end
foo (generic function with 1 method)
julia> @enter foo()
In foo() at none:0
3 │ Core.NewvarNode(:(b₀#233))
4 │ Core.NewvarNode(:(accumulated_data#232))
5 │ local_to#230 = Main.my_timer
6 │ %6 = local_to#230
> 7 │ enabled#231 = Base.getproperty(%6, :enabled)
8 │ %8 = enabled#231
9 └─── goto #3 if not %8
10 2 ── %10 = local_to#230
11 └─── accumulated_data#232 = (push!)(%10, "foo")
About to run: <getproperty(─────────────────────────────...>
1|debug> n
hello
In foo() at none:0
28 10 ┄ %28 = @_8 === 1
29 └─── goto #12 if not %28
30 11 ─ Base.rethrow()
31 12 ┄ %31 = val#235
>32 └─── return %31
About to run: return
1|debug>
julia>
This using Julia-1.11.3, Debugger-0.7.10 and TimerOutputs-0.5.27.
Obvious workaround is to take out the timing while I'm debugging, but that's not ideal especially in a bigger code where there might be many timed functions.
Metadata
Metadata
Assignees
Labels
No labels