Skip to content

Commit 7495c38

Browse files
committed
Add a way to return a value from RunDebugger
1 parent 506c2b5 commit 7495c38

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/DebuggerFramework.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ module DebuggerFramework
9292
language_modes
9393
standard_keymap
9494
terminal
95+
overall_result
9596
end
96-
dummy_state(stack) = DebuggerState(stack, 1, nothing, nothing, nothing, nothing, nothing)
97+
dummy_state(stack) = DebuggerState(stack, 1, nothing, nothing, nothing, nothing, nothing, nothing)
9798

9899
function print_status_synthtic(io, state, frame, lines_before, total_lines)
99100
return 0
@@ -224,7 +225,7 @@ module DebuggerFramework
224225
promptname(level, name) = "$level|$name > "
225226
function RunDebugger(stack, repl = Base.active_repl, terminal = Base.active_repl.t)
226227

227-
state = DebuggerState(stack, 1, repl, nothing, Dict{Symbol, Any}(), nothing, terminal)
228+
state = DebuggerState(stack, 1, repl, nothing, Dict{Symbol, Any}(), nothing, terminal, nothing)
228229

229230
# Setup debug panel
230231
panel = LineEdit.Prompt(promptname(state.level, "debug");
@@ -295,6 +296,8 @@ module DebuggerFramework
295296

296297
print_status(Base.pipe_writer(terminal), state)
297298
Base.REPL.run_interface(terminal, LineEdit.ModalInterface([panel,search_prompt]))
299+
300+
state.overall_result
298301
end
299302

300303
end # module

0 commit comments

Comments
 (0)