Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't step over breakpoint on first statement #148

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Debugger.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down