<Up>/<Down> arrow for navigating command history in debug mode between sessions

オープン
#326 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
julia
領域
devtools

調査の方向性

@enter エントリーポイントから開始し、各セッションのデバッグモードのコマンド履歴がどのように保存されるかを追跡します。既存の Up/Down 履歴動作を確認し、その後、breakpoint コマンドを含む以前のデバッグセッションのコマンドを、後のセッションで呼び出せることを検証します。

索引モデルが issue の本文から書いたものです。

説明

Currently the<Up>/<Down> arrow key can navigate throughout debug history commands but only for the current debug session.
It would be nice if the debug history commands of previous @enter ... calls were available.

Example

Let's say I define the function

function meaninglessfunc(a::T,b::T) where T
    c = zero(T)
    if a > b
        c += max(a,b)
    else
        c += min(a,b)
    end
    return c
end

And I want to debug it:

julia> @enter meaninglessfunc(5,1)
In meaninglessfunc(a, b) at /u/home/wima/fchrstou/code/julia/temp/temp.jl:15
 15  function meaninglessfunc(a::T,b::T) where T
>16      c = zero(T)
 17      if a > b

About to run: (zero)(Int64)
1|debug> bp add max
[ Info: added breakpoint for function max
1] mylittlefunc:22
2] maximum
3] max

1|debug> c
Hit breakpoint:
In max(x, y) at promotion.jl:488
>488  max(x::T, y::T) where {T<:Real} = ifelse(y < x, x, y)

About to run: (<)(1, 5)
1|debug> c
5

Next time I run a debugger, it will not remember any command history

julia> @enter meaninglessfunc(5,1)
In meaninglessfunc(a, b) at /u/home/wima/fchrstou/code/julia/temp/temp.jl:15
 15  function meaninglessfunc(a::T,b::T) where T
>16      c = zero(T)
 17      if a > b

About to run: (zero)(Int64)
1|debug> <Up-Arrow> # nothing happens

When I add a series of peculiar breakpoint to different functions and files, it would be nice that I can easily carry on this setup in consecutive debugging sessions, rather than painfully redefining them.

主要言語
Julia
スター
515
フォーク
50
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaDebug/Debugger.jl のほかの issue

JuliaDebug/Debugger.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。