# Retrace – reverse debugging for production CPython applicat…

Nathan here, one of the people who built Retrace. Happy to answer technical questions. Retrace records a CPython application's interactions with the nondeterministic outside world i.e. network, DB, filesystem, time, randomness, subprocesses, and lets you replay that execution locally and determinis…

- **Page:** https://magpie.gallery/i/retrace-reverse-debugging-for-production-cpython-a-a0zu
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Runs on:** windows, macos, linux
- **Tags:** debugging, python, replay, production

## Source

Web · L15p3r: Retrace – reverse debugging for production CPython applications

- **Original:** https://news.ycombinator.com/item?id=48107362

> Nathan here, one of the people who built Retrace. Happy to answer technical questions. Retrace records a CPython application's interactions with the nondeterministic outside world i.e. network, DB, filesystem, time, randomness, subprocesses, and lets you replay that execution locally and deterministically. The goal is to take a production failure and open the same execution in VS Code, with the ability to step forwards and backwards through the replay. The core idea is to record boundary crossings rather than tracing every Python line in production. External calls are recorded as calls/results/errors, and replay stubs return the recorded results so the original application code runs again deterministically. The preview today covers Python 3.11/3.12 on macOS and Linux, with Flask, Django, requests, psycopg2, and threading/forking covered. There is a compatibility table in the README. This is a preview, not a finished product. Things we know are missing: async support is partial, FastAPI is not in the table yet, Windows is not supported, and free-threaded 3.13 is detected and refused. Happy to go deep on: - how we get determinism on real Python stacks (threads, async, third-party libraries, C extensions) - recording overhead, what it depends on, and what we have actually benchmarked vs claimed - what works and what does not yet - how this differs from rr, Replay.io, pdb time-travel forks, and APM tools Blog post (longer write-up): https://retracesoftware.com/blog/introducing-retrace/ https://github.com/retracesoftware/retracesoftware

## GitHub projects

- https://github.com/retracesoftware/retracesoftware

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
