Skip to content

Commit 759631e

Browse files
WillHaltoko1
authored andcommitted
skip most line events when stepping over code
1 parent 4d914d8 commit 759631e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/debug/thread_client.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,12 @@ def wait_next_action_
857857

858858
depth = @target_frames.first.frame_depth
859859

860-
step_tp iter do
860+
skip_line = false
861+
step_tp iter do |event|
862+
next if event == :line && skip_line
863+
# skip line events until we see a return event
864+
skip_line = !(event == :return || event == :b_return)
865+
861866
loc = caller_locations(2, 1).first
862867
loc_path = loc.absolute_path || "!eval:#{loc.path}"
863868

0 commit comments

Comments
 (0)