Skip to main content
Language v0.2.0 · Preview

Bounded source-mapped debugging

Resolve verified breakpoints through one-based source maps, cancel immutable or Worker sessions, inspect bounded timelines, and record the same contract through the CLI.

Frozen debugger contract

The debugger records the real statevector or stabilizer timeline once, maps generated lines back to one-based source locations, and navigates an immutable session without re-running quantum effects.

2026-07-12
contract
64
breakpoints
10000
frames

Source maps and breakpoints

Every generated line maps to at most one NFC source id, line, and column. Breakpoints publish verified or unverified resolution evidence; an unresolved location never silently binds to another statement.

Cancellation

Pre-aborted sessions terminate with NM-DEBUG-005. Recorded sessions cancel immutably, while browser Worker cancellation sends the protocol event, terminates computation, and rejects stale settlement.

Fail-closed budgets

Source, source-map, frame, and serialized-session limits are checked before exposing a partial debug session. Overflow returns NM-DEBUG-004 with no retained frames.

Session reader compatibility

Only nm-debug-session 0.1 is accepted. This is the first persisted carrier, so no migration exists; unknown versions and fields fail closed until an explicit lossless reader is published. (fail-closed-until-explicit-lossless-reader)

Step through classical helpers (experimental)

Enable classicalFunctions and typedClassicalValues, plus functionResults for Result helpers. Step in enters the next helper call; Step over skips its nested calls; Step out finishes the current call and returns to its caller. F10 uses Step over. The call stack shows the current call first, with argument values, initialized locals and typed return/error values. Bool, fixed numeric arrays and Result values keep their types. Only executed statements and selected branches appear; navigating a recorded session does not rerun measurements or other effects.

Recording uses the entry source and workspace dependency snapshot together. Editing code, experimental options or a dependency invalidates the visible session; record again to inspect the new program. Imported helper steps display their module source id and location without highlighting an unrelated line in the main editor. Main breakpoints remain main-source breakpoints. A replayable runtime failure is announced while its recorded steps remain inspectable; after reaching the failing frame, Restart returns to the recorded beginning. Compilation and recording-budget failures expose no partial session. Typed Result errors are program results and are distinct from execution failures.

Reviewed production operations gate

Stable promotion requires a retained, privacy-reviewed export covering at least 14 days, 100 recorded sessions, and 100 step, continue, or restart operations. Missing terminal events and infrastructure failures reduce crash-free rates; typed debugger rejection and explicit user cancellation remain handled outcomes.

14
days
100
sessions
100
navigation operations
99.5%
minimum crash-free

Telemetry contains only locale, playground path, operation, outcome, typed code, contract version, and a one-operation UUID. Source, source hash, session, frames, timeline, probabilities, breakpoints, request IDs, and user identity are forbidden and discarded before G11 attestation.

Strict operations report · nm-source-debugger-operations-export
npm run report:nm:source-debugger-operational -- <operations-export.json> --check

CLI carrier

Use repeatable --breakpoint flags for human output or the complete versioned JSON session.

nm debug main.nm --breakpoint 6
nm debug main.nm --breakpoint 6 --breakpoint 9 --json
1 MB
source
10000
map entries
32 MB
session

Diagnostics

NM-DEBUG-001NM-DEBUG-002NM-DEBUG-003NM-DEBUG-004NM-DEBUG-005NM-DEBUG-006

The 0.1 CLI records and reports a bounded session; it is not an interactive remote debugger. Durable timeline storage and remote targets remain outside this contract. Passing synthetic tests does not satisfy the reviewed-production G11 gate.