Skip to content

design: define breakpoint pause and inspection protocol #41

Description

@vycdev2

Summary

Define the interactive breakpoint contract for pausing a debug execution, inspecting its state through structured queries, and resuming it. The result should turn the documented concept into a staged protocol that the current interpreter and future native runtime can implement consistently.

Source documentation

Current state

breakpoint and breakpoint <condition> parse, resolve, and typecheck. The tree-walking interpreter evaluates the optional boolean condition and emits one debug line containing the visible bindings and their declared types. Driver and CLI paths can capture and classify that output.

Execution does not pause, there is no query/continue lifecycle or call-stack/expression inspection, and neither an IPC transport nor a structured breakpoint envelope has been selected. The HIR, MIR, native backend, and runtime that would eventually lower native breakpoints are also not implemented.

Scope

This issue includes a design and staging decision for:

  • the pause, query, continue, disconnect, and failure lifecycle;
  • the initial inspection surface (visible bindings and ownership status, selected variable values, expressions, and call-stack/source context);
  • a canonical structured request/response envelope coordinated with design: define complete ASP diagnostic context and failure envelope #35 rather than a second ASP error schema;
  • the transport and process-lifecycle boundary for interpreter debugging and the future native runtime;
  • localhost/path authorization, secret-value exposure, implicit-view/non-destructive evaluation, and capability-exemption rules;
  • debug/release behavior and independently testable implementation slices.

This issue does not include implementing HIR, MIR, LLVM code generation, the general runtime, the MCP server from #37, or a complete debugger implementation before the protocol is decided.

Acceptance criteria

  • The pause/query/resume lifecycle and disconnect/error behavior are specified.
  • The supported query operations and structured breakpoint envelope are specified, with the diagnostic/failure handoff to design: define complete ASP diagnostic context and failure envelope #35 made explicit.
  • Transport, project/path, localhost authorization, secret handling, and non-destructive expression-evaluation rules are decided.
  • Interpreter and future native-runtime responsibilities are separated into independently verifiable implementation stages.
  • Focused protocol/design examples cover a conditional breakpoint, binding inspection, expression query, continue, and failure response.
  • docs/design.md, docs/architecture.md, and the originating progress entry reflect the decision and final status.

Dependencies / open questions

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions