Skip to content

Keep stepping when a breakpoint on the line does not stop - #1192

Open
adityawrk wants to merge 1 commit into
ruby:masterfrom
adityawrk:fix/step-past-inactive-breakpoint
Open

adityawrk wants to merge 1 commit into
ruby:masterfrom
adityawrk:fix/step-past-inactive-breakpoint

Conversation

@adityawrk

@adityawrk adityawrk commented Nov 29, 2026 •

Copy link
Copy Markdown

next, step, and finish were cancelled when the next event was on a line that had a breakpoint, even if that breakpoint did not suspend. Session#stop_stepping? only checked that a breakpoint key existed for the file and line.

Stopped on line 3, with b 4 if: false, next used to run the program to the end. It now stops on line 4:

Stop by #1  BP - Line  target.rb:3 (line)
(rdbg:commands) next
=>   4|   c = b + 1
(rdbg:commands) p b
=> 3

The step is cancelled only when the breakpoint will actually suspend for this event. A false condition, or a call breakpoint seen on a later line event, leaves the step in place. The condition is evaluated once; the breakpoint hook reuses that result. Callers that ask only whether a breakpoint is set on the line are unchanged.

Fixes #1191.

Session#stop_stepping? cancelled next, step, and finish whenever any
breakpoint was set on that file and line. A line breakpoint whose
condition is false, or a call breakpoint seen on a later line event,
then left the program running with no step in progress.

Cancel the step only when that breakpoint will suspend for this event.
The condition is evaluated once and reused by the breakpoint hook.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

next / step / finish are cancelled at a line whose breakpoint does not stop there (e.g. a false condition), and the program runs on

1 participant