Debugging modern applications is still surprisingly painful.
Whether you're building a Python data pipeline, a Node.js microservice, or a Go API, debugging usually boils down to two tedious options:
- Littering your codebase with
console.log()/print()statements and re-running everything. - Stepping forward line-by-line in a traditional debugger, accidentally skipping past the exact mutation that caused the crash, and having to restart from scratch.
To solve this fundamentally, I built Rewind: an open-source, zero-dependency Universal Time-Travel Debugger with sub-microsecond state diffing and an interactive in-browser hot-code patcher.
GitHub Repository: https://github.com/hrinkar01/rewind
What Makes Rewind Different?
Most debugging tools are locked to a single language runtime or rely on heavy external databases and recording daemons that slow execution to a crawl.
Rewind was designed with three foundational principles:
Universal Multi-Runtime Tracing:
Auto-trace Python scripts natively with zero code changes (rewind run script.py) OR wrap ANY command, service, or server across languages (rewind exec "node server.js",rewind exec "go run main.go", Docker containers, or microservice pipelines).Sub-Microsecond Circular State Diffing:
The hardest problem in time-travel debugging is memory bloat and circular references (A -> B -> A). Traditional tools choke with recursion limit crashes or freeze memory. Rewind uses active memory-ID hash tracking (seen_ids) to prune circular graphs in <30 nanoseconds and computes structural state diffs (added,mutated,removed) with virtually zero overhead.In-Browser Time Scrubber & Live Hot-Patching:
When an error occurs, Rewind launches a local web cockpit. You can drag the timeline backward to the exact moment state got corrupted, edit the source code in the live sandbox, verify the fix in memory, and apply the patch directly to disk.Zero External Dependencies:
Built 100% on standard library primitives. No bloated pip dependencies, no background daemon setups, no version collision with host projects.
How It Works in Action:
1. Auto-Trace Python Scripts:
rewind run app.py
2. Trace Any Command, Runtime, or Server:
rewind exec "node backend/server.js"
rewind exec "go run cmd/api/main.go"
rewind exec "python train_model.py"
3. Time-Travel Scrubber & Hot Patching:
As soon as execution finishes or hits an unhandled exception:
- Rewind spins up the local interactive cockpit at
http://localhost:8765. - Drag the scrubber backward across execution steps.
- Inspect real-time variable mutations and state deltas side-by-side.
- Patch your code in the browser sandbox and test the replay instantly.
Quickstart (Try it in 30 seconds):
git clone https://github.com/hrinkar01/rewind.git
cd rewind
pip install .
# Test on a multi-step pipeline bug:
rewind run tests/broken_pipeline.py
What's Next & Open for Contributions:
Rewind is 100% open-source under the MIT license
Whether you'd like to test Rewind on your projects, report edge cases, or contribute code, issues and PRs are super welcome. If you find the project interesting, a Star on GitHub would mean the world!
Top comments (0)