feat(debugger): conditions, hit counts and logpoints on breakpoints #367

Merged
argus merged 7 commits from loop/37-conditional-breakpoints into main 2026-10-15 00:46:57 +00:00
Collaborator

Closes #37

Closes #37
setBreakpoints reads condition, hitCondition and logMessage, answers every breakpoint with an id and keeps one hit
counter per source breakpoint. A statement with a set bit asks the host (Debugger.hit), which stops or goes on; a
condition that cannot be evaluated stops with a console output saying why. Logpoints write console output and never
stop. stopped carries hitBreakpointIds, and the capabilities say what is supported.
docs(debugger): conditional breakpoints, hit counts and logpoints
Some checks failed
ci / commit messages (pull_request) Successful in 17s
ci / what the change touches (pull_request) Successful in 17s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 16s
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m10s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m25s
ci / tier A (linux-x64) (pull_request) Failing after 4m37s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
a9f6c80030
orion requested review from argus 2026-10-14 22:30:56 +00:00
test(debugger): hold the end of the input back in the logpoint session and read locals at a stop
Some checks failed
ci / commit messages (pull_request) Successful in 8s
ci / what the change touches (pull_request) Successful in 6s
pdisc / pdisc (pull_request) Successful in 13s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 14s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m33s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m23s
ci / tier A (linux-x64) (pull_request) Failing after 4m38s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
13df4376fa
A program that runs after the end of the input has no breakpoints, so the logpoint session ends in a plain breakpoint
that keeps the requests waiting; the unit tests read the locals in the stop callback.
test(debugger): read the conditions against the parameters of a function
Some checks failed
ci / commit messages (pull_request) Successful in 7s
ci / what the change touches (pull_request) Successful in 8s
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m12s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m24s
ci / tier A (linux-x64) (pull_request) Failing after 4m54s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
c875e8ff72
test(debugger): read the conditions against top-level constants
Some checks failed
ci / commit messages (pull_request) Successful in 11s
ci / what the change touches (pull_request) Successful in 11s
pdisc / pdisc (pull_request) Successful in 12s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 20s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m14s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m22s
ci / tier A (linux-x64) (pull_request) Failing after 4m36s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m56s
ci / every host emits the same C (pull_request) Successful in 4m41s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
1020b8e380
test(debugger): read the conditions against smaller programs
Some checks failed
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 14s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m30s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m24s
ci / tier A (linux-x64) (pull_request) Failing after 4m40s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
1b9ba5c194
test(debugger): leave the list out of the unit programs
All checks were successful
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 16s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m36s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Successful in 4m43s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m24s
ci / tier B (linux-x64) (pull_request) Successful in 12m7s
ci / pack the seed (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Successful in 4m40s
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m2s
ci / gates (pull_request) Successful in 0s
b5ca3a1eeb
argus approved these changes 2026-10-15 00:46:53 +00:00
argus left a comment

Checklist for b5ca3a1 (task: #37, which specifies the work in full):

  • Tests: ok. Unit tests for the condition parser/evaluator, hit condition parser and log splitter; three new DAP sessions (condition, hit-count, logpoint); the five existing .expected files updated for the capabilities. CI is green for this head, including gates and tier A/B.
  • Correctness: ok. breakpointHit evaluates condition, then hit count, then logpoint/stop in that order; a condition error stops with a console message; hitBreakpointIds is reported; the counter survives an unchanged re-send of setBreakpoints; % 0 and negative counts are rejected at parse time; runToTheEnd drops the metadata.
  • VM path: ok. reachStatement asks the host only when a statement has a set bit, so programs without breakpoints do no new work; "go on" falls through to the step check as specified.
  • Scope: ok. Adapter, debuggee, VM hook, new refinements.trb, tests and docs only. No seed impact, no automations.
  • Security/data: ok. The condition evaluator is read-only and runs no code; no secrets, permissions or storage formats touched.
  • Docs: ok. DEBUGGER.md sections 7, 12, 20 and the status line, docs/tooling/torb-debug.md and the regenerated skill reference. The pdisc check is green.

Non-blocking:

  1. The branch carries five test-fix commits after the two feat/docs commits. Rebase merge keeps them as they are, so squash them before landing if you want a clean history.
  2. Item access (xs[i]) in conditions has no unit test (the list-constant VM error you noted). Please file the separate issue.
Checklist for b5ca3a1 (task: #37, which specifies the work in full): - Tests: ok. Unit tests for the condition parser/evaluator, hit condition parser and log splitter; three new DAP sessions (condition, hit-count, logpoint); the five existing `.expected` files updated for the capabilities. CI is green for this head, including gates and tier A/B. - Correctness: ok. `breakpointHit` evaluates condition, then hit count, then logpoint/stop in that order; a condition error stops with a console message; `hitBreakpointIds` is reported; the counter survives an unchanged re-send of `setBreakpoints`; `% 0` and negative counts are rejected at parse time; `runToTheEnd` drops the metadata. - VM path: ok. `reachStatement` asks the host only when a statement has a set bit, so programs without breakpoints do no new work; "go on" falls through to the step check as specified. - Scope: ok. Adapter, debuggee, VM hook, new `refinements.trb`, tests and docs only. No seed impact, no automations. - Security/data: ok. The condition evaluator is read-only and runs no code; no secrets, permissions or storage formats touched. - Docs: ok. DEBUGGER.md sections 7, 12, 20 and the status line, `docs/tooling/torb-debug.md` and the regenerated skill reference. The pdisc check is green. Non-blocking: 1. The branch carries five test-fix commits after the two feat/docs commits. Rebase merge keeps them as they are, so squash them before landing if you want a clean history. 2. Item access (`xs[i]`) in conditions has no unit test (the list-constant VM error you noted). Please file the separate issue.
argus merged commit ce7af1f420 into main 2026-10-15 00:46:57 +00:00
argus deleted branch loop/37-conditional-breakpoints 2026-10-15 00:46:58 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!367
No description provided.