-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Currently, we can add a CheckBreakpoint with break if: <expression>
. I personally haven't used it before but it looks like it's not practical in most cases because: once the expression
is fulfilled, the breakpoint will stop at every single line afterward.
❯ ruby -Ilib -rdebug check_bp_issue.rb
[1, 6] in check_bp_issue.rb
=> 1| binding.b(do: "break if: a == 1")
2|
3| a = 1
4| b = 2
5| c = 3
6| d = 4
=>#0 <main> at check_bp_issue.rb:1
(rdbg:binding.break) break if: a == 1
#0 BP - Check a == 1
[1, 6] in check_bp_issue.rb
1| binding.b(do: "break if: a == 1")
2|
3| a = 1
=> 4| b = 2
5| c = 3
6| d = 4
=>#0 <main> at check_bp_issue.rb:4
Stop by #0 BP - Check a == 1
(rdbg) c # continue command
[1, 6] in check_bp_issue.rb
1| binding.b(do: "break if: a == 1")
2|
3| a = 1
4| b = 2
=> 5| c = 3
6| d = 4
=>#0 <main> at check_bp_issue.rb:5
Stop by #0 BP - Check a == 1
(rdbg) c # continue command
[1, 6] in check_bp_issue.rb
1| binding.b(do: "break if: a == 1")
2|
3| a = 1
4| b = 2
5| c = 3
=> 6| d = 4
=>#0 <main> at check_bp_issue.rb:6
Stop by #0 BP - Check a == 1
(rdbg) c # continue command
So perhaps we should make this a one-off breakpoint?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request