Unexpected `n` behavior within `open(f, ...)`
まだ誰も着手していません。
評価
調査の方向性
wrapper の例を再現し、si、so、n を使って io.jl:296 に示されているエントリポイント open(f, args) をステップ実行します。観測されたジャンプを n のドキュメントに記載された意味と比較し、そのうえでステップ実行の動作またはそのドキュメントを修正する必要があるかどうかを判断し、焦点を絞った debugger テストで結果を検証します。
索引モデルが issue の本文から書いたものです。
説明
When debugging code such as the following:
function wrapper()
mktempdir() do dir
open(joinpath(dir, "test.txt"), "w") do io
println(io, "data")
end
end
end
Using n to enter a do block does not work; I think this might be expected, but I wonder if the docs (which state that n means "step to the next line" should instead say something like "step to the next expression" if that is indeed what it is doing.)
The truly unexpected piece is when trying to navigate within open to get into the println(): after si'ing and so'ing my way until I'm in open(), I am greeted by the following:
1|debug> si
In open(f, args) at io.jl:296
295 function open(f::Function, args...; kwargs...)
>296 io = open(args...; kwargs...)
297 try
298 f(io)
299 finally
300 close(io)
About to run: (NamedTuple)()
I then hit n to attempt to jump down to the f(io), but when I hit n I get:
1|debug> n
In open(f, args) at io.jl:296
295 function open(f::Function, args...; kwargs...)
>296 io = open(args...; kwargs...)
297 try
298 f(io)
299 finally
300 close(io)
About to run: return
I have somehow just skipped to the end of the open() function, and continuing to step causes me to exit out.
- 主要言語
- 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 日以内に返信