Skip to main content

Retrace DAP debug adapter and replay tooling

Project description

retrace-dap

Go debug adapter for Retrace recordings. This project owns the DAP server that launches and controls Python replay subprocesses.

The Python runtime (retracesoftware) performs deterministic replay; retrace-dap translates editor/debugger requests into the Retrace control protocol and drives replay from the outside.

What this repo contains

  • cmd/replay/ — CLI entrypoint (replay binary)
  • replay/ — DAP proxy, control protocol client, recording index/extract, workspace generation, and replay launch plumbing

Build

go build -o replay ./cmd/replay

Python Wheel

This repository publishes the PyPI package retracesoftware-dap. The package contains a tiny Python wrapper plus a platform-specific Go replay binary built from cmd/replay.

python -m pip install --upgrade pip build setuptools wheel setuptools_scm
python -m build --wheel --outdir dist
python -m pip install dist/retracesoftware_dap-*.whl
python -c "from retrace_dap import binary_path; print(binary_path())"
retrace-dap --help

The installed Python package exposes:

  • retrace_dap.binary_path() — returns the packaged replay/DAP binary path.
  • retrace-dap — console script that execs the packaged binary.
  • retrace-ai-driver — AI orchestration driver that talks to the replay DAP adapter and a hosted AI service.

RETRACE_REPLAY_BIN remains the local-development escape hatch. If it points at an executable replay binary, binary_path() returns that path instead of the packaged wheel binary.

Release To PyPI

PyPI Trusted Publishing must be configured for:

PyPI project: retracesoftware-dap
GitHub owner: retracesoftware
GitHub repository: retrace-dap
Workflow name: Build & Release
Workflow file: release.yml
Environment: leave blank unless the release workflow is changed to use one

The release workflow builds platform wheels for Linux and macOS, smoke-tests the installed wheel, uploads wheels to a GitHub Release, then publishes the same wheels to PyPI.

Manual release from main:

gh workflow run release.yml \
  -R retracesoftware/retrace-dap \
  --ref main \
  -f version=0.2.14

The workflow creates and pushes tag v0.2.14; tags can also trigger releases directly.

Common commands

# Process tree for a recording (VS Code sidebar)
replay --recording trace.retrace --index

# Extract pidfiles
replay --recording trace.retrace --extract

# Generate VS Code workspace
replay --recording trace.retrace --workspace

# DAP adapter (stdin/stdout)
replay --recording trace.retrace --dap [--pid N]

Test

go test ./...

Dev container

Open this repository in a Dev Container (VS Code / Cursor: Dev Containers: Reopen in Container). The container installs Go 1.25, builds bin/replay, and installs the retracesoftware Python package so integration tests can launch replay sessions.

go test ./...
go build -o bin/replay ./cmd/replay

Relationship to retracesoftware

This repo was split from retracesoftware/retracesoftware/go/. Python replay behavior lives in the main Retrace package (control_runtime.py, install/, proxy/, stream/). Changes that affect stop semantics, cursor navigation, or control-protocol payloads usually need coordinated updates in both repos.

The main retracesoftware package should depend on this package so:

python -m pip install retracesoftware

also installs retracesoftware-dap, and the retracesoftware.replay wrapper can discover the packaged replay/DAP binary through retrace_dap.binary_path().

Environment

Python replay discovery from tooling still uses RETRACE_REPLAY_BIN pointing at the built replay binary from this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

retracesoftware_dap-0.2.25-py3-none-manylinux_2_17_x86_64.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

retracesoftware_dap-0.2.25-py3-none-manylinux_2_17_aarch64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

retracesoftware_dap-0.2.25-py3-none-macosx_12_0_x86_64.whl (2.8 MB view details)

Uploaded Python 3macOS 12.0+ x86-64

retracesoftware_dap-0.2.25-py3-none-macosx_12_0_arm64.whl (2.7 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

File details

Details for the file retracesoftware_dap-0.2.25-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for retracesoftware_dap-0.2.25-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 95639cd44c80393fb9d9497ad2a31a80461e64a07f41c20a95ca947f85fcae26
MD5 548bb144e2097c1bffd388629ad835ff
BLAKE2b-256 ee67d8dab2365cd4a3e4df94e88224148ab824a43c02d79d0fd6efd464acbe2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for retracesoftware_dap-0.2.25-py3-none-manylinux_2_17_x86_64.whl:

Publisher: release.yml on retracesoftware/retrace-dap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file retracesoftware_dap-0.2.25-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for retracesoftware_dap-0.2.25-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 98e05be193a4576025ef1cc2cc4fcc70a1d52a46e5290ba614ea60e3e1bde511
MD5 301a665903f7372da7a6f22d96e38e36
BLAKE2b-256 624ef5fa31336e479a8f1621a27378cbc373b5700b8405d4db215808087a51f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for retracesoftware_dap-0.2.25-py3-none-manylinux_2_17_aarch64.whl:

Publisher: release.yml on retracesoftware/retrace-dap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file retracesoftware_dap-0.2.25-py3-none-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for retracesoftware_dap-0.2.25-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 e198632707a4320a7bb8c6c5100f8c994661a776e15234310a6aa0e5681db180
MD5 e0f3a8537b88a45bc10b6277d8941a91
BLAKE2b-256 0ea68e0669988438c85c70f4ccf5ab680774437caa0dc5661c811335535d5138

See more details on using hashes here.

Provenance

The following attestation bundles were made for retracesoftware_dap-0.2.25-py3-none-macosx_12_0_x86_64.whl:

Publisher: release.yml on retracesoftware/retrace-dap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file retracesoftware_dap-0.2.25-py3-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for retracesoftware_dap-0.2.25-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 f7e7b59772ab58f45640026bef5d1a636e634a6b4f267d3e84fe0c39f5859fd6
MD5 0c3c317dbe0ff9b7b11b72c6e3d020d7
BLAKE2b-256 0ae113c7cfabc15980462744a91be0d18497dd3e83c6b1313f53aa87cf0f9d71

See more details on using hashes here.

Provenance

The following attestation bundles were made for retracesoftware_dap-0.2.25-py3-none-macosx_12_0_arm64.whl:

Publisher: release.yml on retracesoftware/retrace-dap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page