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.18-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.18-py3-none-manylinux_2_17_aarch64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 12.0+ x86-64

retracesoftware_dap-0.2.18-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.18-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for retracesoftware_dap-0.2.18-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 6bd73701f713cf431d6a45fdb52f9c38412d8f6f37df3ae87939db9d87c0c20a
MD5 1eaada6e57b4a0e5fe89a92332045368
BLAKE2b-256 085fd47b34d7e6b14d783df2013ee0478b84a628e956d9a9eb7c2fe72646719a

See more details on using hashes here.

Provenance

The following attestation bundles were made for retracesoftware_dap-0.2.18-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.18-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for retracesoftware_dap-0.2.18-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 eff060d77370e97a98b20f00714f62ce16cc5731c5232cb9d1c8ef8aed301c3f
MD5 f685bf9001ce2b506a3bce8feba7f685
BLAKE2b-256 a30b9c906fc0e1d8ed6004fa1284cc441da7ef9f08671fc049f6ec85ce9eb0c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for retracesoftware_dap-0.2.18-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.18-py3-none-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for retracesoftware_dap-0.2.18-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 5e1f525119d3d02c304951781efb25851ca0c3936eb1a67a86b34a4c3c5212d9
MD5 4ca49ed4238f10336a0b4a07e8b41052
BLAKE2b-256 7d1862db5f932fd3538070dbb731463e12f16ad6cc0f987f251d5aa5fbd5d914

See more details on using hashes here.

Provenance

The following attestation bundles were made for retracesoftware_dap-0.2.18-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.18-py3-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for retracesoftware_dap-0.2.18-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 856963166c7e303223b75498be58bc9bf36827bab6440b097c6ccb065e0ea297
MD5 5f4f415a475cd692740372593f469c3b
BLAKE2b-256 a1bb633dae13778c1d021ac66fa3b648a58c043fbc3e55ef0ce34eb3ae862978

See more details on using hashes here.

Provenance

The following attestation bundles were made for retracesoftware_dap-0.2.18-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