Skip to content

Commit 94e3ff5

Browse files
authored
prevent erroring out of debugger if we add an argument to one of the JuliaInterpreter commands (#143)
1 parent 58307b4 commit 94e3ff5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/commands.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ function show_breakpoint(io::IO, bp::BreakpointRef)
2323
end
2424

2525
function execute_command(state::DebuggerState, ::Union{Val{:c},Val{:nc},Val{:n},Val{:se},Val{:s},Val{:si},Val{:sg},Val{:so}}, cmd::AbstractString)
26+
# These commands take no arguments
27+
length(split(cmd)) == 1 || return execute_command(state, Val(:_), cmd) # print error
2628
assert_allow_step(state) || return false
2729
cmd == "so" && (cmd = "finish")
2830
ret = debug_command(state.mode, state.frame, Symbol(cmd))

0 commit comments

Comments
 (0)