When interacting with TimerOutputs.jl, only displays lowered code
まだ誰も着手していません。
評価
調査の方向性
まず、@timeit と @enter を使用して、提供された MWE を Julia 1.11.3、Debugger 0.7.10、TimerOutputs 0.5.27 で再現します。Debugger が時間計測対象の関数とその lowering 後の表示をどのように扱うかを調べます。時間計測を有効にしたまま、元の関数のソースを通常どおりステップ実行できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Julia
- スター
- 515
- フォーク
- 50
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaDebug/Debugger.jl のほかの issue
-
tagbot-manual
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JuliaDebug/Debugger.jl#410 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
JuliaDebug/Debugger.jl#423 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
JuliaDebug/Debugger.jl#422 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
JuliaDebug/Debugger.jl#418 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
JuliaDebug/Debugger.jl#417 · コメント 1 件 ·
JuliaDebug/Debugger.jl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
JuliaDebug/Cthulhu.jl#716 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Review dependenciesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
rafaqz/DimensionalData.jl#1253 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
osrep/Runes2P.jl#283 ·
メンテナーはふだん 1 日以内に返信