Skip to content

Epic: Implement Debug Adapter Protocol (DAP) Support #242

@ztripez

Description

@ztripez

Summary

This epic tracks the implementation of the Debug Adapter Protocol (DAP) for the Continuum DSL. It allows developers to interactively debug simulations using IDEs like VS Code.

Accomplishments

  • cdsl-dap Crate: Implementation of the DAP JSON-RPC wire protocol and server.
  • Runtime Debug Hooks: Added yield/pause capability to the Level-based executor and execute_until_breakpoint() support.
  • Symbol Mapping: Automatic mapping of line breakpoints to internal SignalIds using IR metadata.
  • Hierarchical Inspection: Support for viewing Global Signals, Era Configuration, and Entity Populations (including instances and fields) in the IDE.
  • Stepping: Support for "Next" (Step Over Phase) and "Continue" (Run to next breakpoint/tick).
  • VS Code Integration: Updated vscode-cdsl extension to register the debugger and launch the DAP server.

Future Work

  • Data Breakpoints: Pausing based on complex conditions (integrating with the Fracture system).
  • Operator-level stepping: Stepping into individual operator bodies.
  • Expression Evaluation: Support for evaluate requests in the debug console.

Related

Part of the Unified Compiler Payoff (#225).

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