Skip to content

Commit 2059d4a

Browse files
committed
Revert "clarify logic for skipping line, support n <num> use"
This reverts commit 0de8fcc.
1 parent 94c9ccb commit 2059d4a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/debug/thread_client.rb

+3-6
Original file line numberDiff line numberDiff line change
@@ -869,17 +869,14 @@ def wait_next_action_
869869
skip_line = false
870870
step_tp iter do |event|
871871
next if event == :line && skip_line
872+
# skip line events until we see a return event
873+
skip_line = !(event == :return || event == :b_return)
872874

873875
loc = caller_locations(2, 1).first
874876
loc_path = loc.absolute_path || "!eval:#{loc.path}"
875877

876-
frame_depth = DEBUGGER__.frame_depth - 3
877-
878-
# If we're at a deeper stack depth, we can skip line events until there's a return event.
879-
skip_line = event == :line && frame_depth > depth
880-
881878
# same stack depth
882-
(frame_depth <= depth) ||
879+
(DEBUGGER__.frame_depth - 3 <= depth) ||
883880

884881
# different frame
885882
(next_line && loc_path == path &&

0 commit comments

Comments
 (0)