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

Aperta
#326 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
julia
Ambito
devtools

Direzione di ricerca

Inizia dal punto di ingresso @enter e segui come viene memorizzata la cronologia dei comandi in modalità debug per ogni sessione. Controlla il comportamento esistente della cronologia con Up/Down, quindi verifica che i comandi delle sessioni di debug precedenti, inclusi i comandi di breakpoint, possano essere richiamati in una sessione successiva.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Julia
Stelle
515
Fork
50
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di JuliaDebug/Debugger.jl

Tutte le issue di JuliaDebug/Debugger.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.