time-travel-debugging
/time-travel-debugging
Record an execution once and replay it deterministically so you can step backward to the moment a value went wrong. Use when a bug is hard to reproduce or the failure surfaces long after its cause, and rerunning changes the outcome.
- Author
- Amey-Thakur ↗
- Repository
- AI-SKILLS ↗
- Licence
- MIT
- Last repository change
- 05.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Record an execution once and replay it deterministically so you can step backward to the moment a value went wrong. Use when a bug is hard to reproduce or the failure surfaces long after its cause, and rerunning changes the outcome.
Original author description
Record an execution once and replay it deterministically so you can step backward to the moment a value went wrong. Use when a bug is hard to reproduce or the failure surfaces long after its cause, and rerunning changes the outcome.
How it works
- Method
- Litmus tests
- Boundaries
SKILL.md preview
--- name: time-travel-debugging description: Record an execution once and replay it deterministically so you can step backward to the moment a value went wrong. Use when a bug is hard to reproduce or the failure surfaces long after its cause, and rerunning changes the outcome. --- # Time-travel debugging The hardest bugs are the ones where the crash is far downstream of the cause: a field is corrupted at step three and blows up at step three hundred. A live debugger can only step forward, so you rerun and hope to catch it. Recording the run once and replaying it lets you set a breakpoint on the corruption and run the clock backward to who wrote it. ## Method 1. **Record the failing run so replay is bit-for-bit identical.** `rr record ./app` captures every non-deterministic input, thread schedule, syscall result, signal, so `rr replay` reproduces the exact same execution every time. The intermittent bug becomes a fixed recording you can study without fear of it not happening again. 2. **Set a watchpoint on the corrupted value, then reverse.** Once replay stops at the symptom, `watch -l corrupted_field` and `reverse-continue` runs backward until the last write to that address. This is the move a forward debugger cannot make: you jump straight to the writer instead of guessing which of three hundred steps did it. 3. **Bisect the timeline, not the code.** A deterministic recording has stable event numbers. When you know the value is good at one point and bad at another, `reverse-continue` and `continue` between them narrow the write to a single instruction the way `git bisect` narrows a commit. 4. **For front-end state, replay through the action log.** Redux DevTools records every dispatched action and lets you step through them, jump to any past state, and see the diff each action produced. The corrupted store is traced to the exact action and reducer, and "time-travel" replays the sequence without clicking through the UI again. 5. **Pin down non-determinism the recorder cannot capture.** `rr` serializes threads, but true external sources, wall-clock time, random seeds, network responses, still vary unless you stub them. Seed the RNG, inject a fixed clock, and record with those pinned so the replay is genuinely reproducible and not merely usually so. 6. **Confirm the cause by editing and re-recording, not by editing replay.** A replay is read-only history: you cannot fix it in place. Change the source, record a fresh run, and verify the write no longer corrupts the value. Reasoning that never leaves the old recording proves nothing about the fix. ## Litmus tests - Does replay reproduce the failure on every run, not just sometimes? - Did reverse execution land you on the instruction that wrote the bad value? - Is every non-deterministic input either captured by the recorder or stubbed? ## Boundaries Recording adds overhead and, for `rr`, needs specific hardware performance counters, so it does not run everywhere or under heavy production load. It shines on single-machine, CPU-bound bugs; a fault that only appears across distributed services belongs to tracing, which follows one request across hosts rather than replaying one process.
Versions
The database has no other skills named time-travel-debugging.
Database snapshot: 13.11.2026 · package version 2fd7be321a17 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100root-cause-debugging
Debug by finding the root cause before changing code: reproduce, read the full error, check what changed, form one hypothesis at a time and test it, write the failing test, then fix; with a hard stop after three failed fixes to question the approach. Use when a test fails, a bug… - 90debugging
Quorum's debugging habit: reproduce a failure, read the whole error, check what changed, and name the root cause with evidence before changing any code. Use when a test, check, build, or command fails, or a bug is reported, and the cause isn't already proven. It only diagnoses… - 90root-cause-debugging
Use when behavior is wrong or broke and the cause is unknown, or someone asks what went wrong: a failing test, wrong totals or output, a 500 in production, something that worked before, a flaky run. Not for adding logging, debug settings, explaining traces or tests for new features. - 100systematic-debugging
Find the root cause before changing anything: read the error, reproduce, gather evidence, rank hypotheses, test one at a time, then fix at the source with a failing test first. Use for any bug, test failure, build failure, flaky or intermittent behavior, performance regression… - 100reproduce-bug
Systematically reproduce and investigate a bug from a GitHub issue. Use when the user provides a GitHub issue number or URL for a bug they want reproduced or investigated. - 9008-debug
Reproduce and fix a known bug, or find an unknown root cause by hypothesis validation. Use when the user wants to fix a bug, find why something breaks, or reopen a stuck investigation. Not for building a feature or reviewing a diff.