JuliaDebug / JuliaDebug/Debugger.jl
When interacting with TimerOutputs.jl, only displays lowered code
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 514
- Forks
- 50
- Avg merge
- 9d 9h
- Merged PRs (30d)
- 1
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided MWE with Julia 1.11.3, Debugger 0.7.10, and TimerOutputs 0.5.27, using @timeit and @enter. Inspect how Debugger handles the timed function and its lowered display. Done means stepping through the original function source works normally while timing remains enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100