Skip to content

Expose debug adapter as a standalone DAP server and a CLI trace tool#4

Open
RaoulSchaffranek wants to merge 3 commits into
mainfrom
standalone-interfaces
Open

Expose debug adapter as a standalone DAP server and a CLI trace tool#4
RaoulSchaffranek wants to merge 3 commits into
mainfrom
standalone-interfaces

Conversation

@RaoulSchaffranek

@RaoulSchaffranek RaoulSchaffranek commented Jul 17, 2026

Copy link
Copy Markdown
Member

Add two ways to use the trace-replay debug adapter outside VS Code, both thin wrappers over one shared vscode-free headless core (the DAP stepping engine is untouched):

  • soroban-dap: the debug adapter served over a TCP socket (net.createServer, one session per connection via a backend-selector constructor overload) so other DAP clients (nvim-dap, IntelliJ, Emacs) can drive it. Binds loopback by default; per-connection teardown disposes the backend on abrupt close.
  • soroban-trace: a one-shot CLI that emits a Rust-source-level execution trace as kind-tagged JSONL (meta/stop/result) for scripts, CI, and agents.

Shared core in src/debugAdapter: backendFor (backend selector), buildStopModel (single source of truth for stop points, extracted from launchRequest), and pcAtIndex. CLI projection lives in src/trace; server in src/server. Both bins are bundled by esbuild; thin main.ts entry points are c8-excluded.

Docs: docs/interfaces.md (design + JSONL schema) and docs/standalone-interfaces.md (usage), linked from the README. Full test coverage added (stopModel, backendFor, projectStop, runTrace, dapServer integration).

Add two ways to use the trace-replay debug adapter outside VS Code, both
thin wrappers over one shared vscode-free headless core (the DAP stepping
engine is untouched):

- soroban-dap: the debug adapter served over a TCP socket (net.createServer,
  one session per connection via a backend-selector constructor overload) so
  other DAP clients (nvim-dap, IntelliJ, Emacs) can drive it. Binds loopback
  by default; per-connection teardown disposes the backend on abrupt close.
- soroban-trace: a one-shot CLI that emits a Rust-source-level execution
  trace as kind-tagged JSONL (meta/stop/result) for scripts, CI, and agents.

Shared core in src/debugAdapter: backendFor (backend selector), buildStopModel
(single source of truth for stop points, extracted from launchRequest), and
pcAtIndex. CLI projection lives in src/trace; server in src/server. Both bins
are bundled by esbuild; thin main.ts entry points are c8-excluded.

Docs: docs/interfaces.md (design + JSONL schema) and docs/standalone-interfaces.md
(usage), linked from the README. Full test coverage added (stopModel, backendFor,
projectStop, runTrace, dapServer integration).
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