diff --git a/src/Debugger.jl b/src/Debugger.jl index 259bc51..2795c46 100644 --- a/src/Debugger.jl +++ b/src/Debugger.jl @@ -11,7 +11,7 @@ using REPL.LineEdit using REPL.REPLCompletions using CodeTracking -using JuliaInterpreter: JuliaInterpreter, Frame, @lookup, FrameCode, BreakpointRef, debug_command, leaf, root, BreakpointState, +using JuliaInterpreter: JuliaInterpreter, Frame, @lookup, FrameCode, BreakpointRef, debug_command, leaf, root, BreakpointState, finish_and_return!, Compiled using JuliaInterpreter: pc_expr, moduleof, linenumber, extract_args, @@ -90,7 +90,9 @@ function _make_frame(mod, arg) frame === nothing && error("failed to enter the function, perhaps it is set to run in compiled mode") frame = JuliaInterpreter.maybe_step_through_kwprep!(frame) frame = JuliaInterpreter.maybe_step_through_wrapper!(frame) - JuliaInterpreter.maybe_next_call!(frame) + if !JuliaInterpreter.shouldbreak(frame, frame.pc) + JuliaInterpreter.maybe_next_call!(frame) + end frame end end diff --git a/src/repl.jl b/src/repl.jl index bc5be5b..683e4cd 100644 --- a/src/repl.jl +++ b/src/repl.jl @@ -139,7 +139,7 @@ function RunDebugger(frame, repl = nothing, terminal = nothing; initial_continue state.standard_keymap = Dict{Any,Any}[skeymap, LineEdit.history_keymap, LineEdit.default_keymap, LineEdit.escape_defaults] panel.keymap_dict = LineEdit.keymap([repl_switch;state.standard_keymap]) - if initial_continue + if initial_continue && !JuliaInterpreter.shouldbreak(frame, frame.pc) try execute_command(state, Val(:c), "c") catch err