JuliaDebug / JuliaDebug/Debugger.jl
<Up>/<Down> arrow for navigating command history in debug mode between sessions
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 514
- Forks
- 50
- Avg merge
- 9d 9h
- Merged PRs (30d)
- 1
Description
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.
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 at the @enter entry point and trace how debug-mode command history is stored for each session. Check the existing Up/Down history behavior, then verify that commands from earlier debugging sessions, including breakpoint commands, can be recalled in a later session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100