Skip to content

Commit 4c2116d

Browse files
Alexander Kiselevclaude
andcommitted
fix: Add breakpoint removal before final continue in hit count tests
Hit count breakpoints fire when the hit count reaches the specified value, but don't disable after that. So continuing after hitting the breakpoint would fire again on subsequent calls for recursive functions like factorial. Added "breakpoint remove all" step before final continue to ensure the program exits cleanly, consistent with other tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4614f69 commit 4c2116d

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

tests/scenarios/hitcount_breakpoint_c.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ steps:
3131
- index: 0
3232
function: "factorial"
3333

34+
# Remove breakpoints to avoid hitting them again during remaining recursive calls
35+
- action: command
36+
command: "breakpoint remove all"
37+
expect:
38+
success: true
39+
3440
- action: command
3541
command: "continue"
3642

tests/scenarios/hitcount_breakpoint_go.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ steps:
3232
- index: 0
3333
function: "main.factorial"
3434

35+
# Remove breakpoints to avoid hitting them again during remaining recursive calls
36+
- action: command
37+
command: "breakpoint remove all"
38+
expect:
39+
success: true
40+
3541
- action: command
3642
command: "continue"
3743

0 commit comments

Comments
 (0)