Skip to content

Implement hit count breakpoints#1087

Open
lionel- wants to merge 2 commits intofeature/log-breakpointsfrom
feature/hit-count
Open

Implement hit count breakpoints#1087
lionel- wants to merge 2 commits intofeature/log-breakpointsfrom
feature/hit-count

Conversation

@lionel-
Copy link
Contributor

@lionel- lionel- commented Mar 5, 2026

Branched from #1086 .

Adds support for DAP hit count breakpoints. When a breakpoint has a hitCondition, the breakpoint location must be reached at least that many times before it fires. The value is interpreted as a plain integer with >= semantics. For more complex hit patterns, users can combine hit counts with conditional breakpoints.

Hit counts are reset when ReadConsole returns to a top-level (non-browser) prompt, meaning the execution that may have hit breakpoints is complete. This way counts survive across continue/step within a debug session but start fresh for new sessions.

Hit count integrates with the existing breakpoint feature chain. Hit counts with conditions require both to be satisfied, and hit counts with log messages only emit output once the threshold is reached. If the hit count can't be parsed, the error message is propagated to the Console in breakpoint fences with a clickable link.

QA Notes

Tested on the backend side.

Hit counts should behave well on their own or in combination with logpoints and conditional breakpoints. Parse errors appear in the console.

Screenshot 2026-03-05 at 12 05 36 Screenshot 2026-03-05 at 12 05 24

@lionel- lionel- requested a review from DavisVaughan March 5, 2026 11:46
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.

1 participant