Skip to content

Commit 86a1170

Browse files
authored
Add :sr command to step until next return. (#325)
* Add :sr command to step until next return. See JuliaDebug/JuliaInterpreter.jl#558. * Set version to 0.7.8.
1 parent e3336d2 commit 86a1170

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Debugger"
22
uuid = "31a5f54b-26ea-5ae9-a837-f05ce5417438"
3-
version = "0.7.7"
3+
version = "0.7.8"
44

55
[deps]
66
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ Stepping (basic):
5454
- `n`: step to the next line
5555
- `u [i::Int]`: step until line `i` or the next line past the current line
5656
- `s`: step into the next call
57-
- `so`: step out of the current cal
57+
- `so`: step out of the current call
5858
- `sl`: step into the last call on the current line (e.g. steps into `f` if the line is `f(g(h(x)))`).
59+
- `sr`: step until next `return`.
5960
- `c`: continue execution until a breakpoint is hit
6061
- `f [i::Int]`: go to the `i`-th function in the call stack (stepping is only possible in the function at the top of the call stack)
6162
- `up/down [i::Int]` go up or down one or `i` functions in the call stack

src/commands.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function show_breakpoint(io::IO, bp::BreakpointRef, state::DebuggerState)
2525
print(io, String(take!(outbuf.io)))
2626
end
2727

28-
function execute_command(state::DebuggerState, v::Union{Val{:c},Val{:nc},Val{:n},Val{:se},Val{:s},Val{:si},Val{:sg},Val{:so},Val{:u},Val{:sl}}, cmd::AbstractString)
28+
function execute_command(state::DebuggerState, v::Union{Val{:c},Val{:nc},Val{:n},Val{:se},Val{:s},Val{:si},Val{:sg},Val{:so},Val{:u},Val{:sl},Val{:sr}}, cmd::AbstractString)
2929
# These commands take no arguments
3030
kwargs = Dict()
3131
if v != Val(:u)
@@ -252,6 +252,7 @@ function execute_command(state::DebuggerState, ::Union{Val{:help}, Val{:?}}, cmd
252252
- `s`: step into the next call\\
253253
- `so`: step out of the current call\\
254254
- `sl`: step into the last call on the current line (e.g. steps into `f` if the line is `f(g(h(x)))`).\\
255+
- `sr`: step until next `return`.\\
255256
- `c`: continue execution until a breakpoint is hit\\
256257
- `f [i::Int]`: go to the `i`-th function in the call stack (stepping is only possible in the function at the top of the call stack)\\
257258
- `up/down [i::Int]` go up or down one or `i` functions in the call stack\\

0 commit comments

Comments
 (0)