Timetracer for VS Code
Time-travel debugging for Python APIs — Browse, replay, and debug recorded cassettes directly in VS Code.
Features
Cassette Explorer
Browse all your recorded cassettes in the sidebar, organized by date:
- Visual status indicators — Green checkmark for success, red X for errors
- Quick info — Method, endpoint, status code, duration at a glance
- Slow request warnings — Warning indicator for requests over 1 second
- Supports compression — Reads both
.json and .json.gz cassettes
Interactive Timeline
Click any cassette to see a visual timeline of all dependency calls:
- HTTP requests to external APIs
- Database queries (SQLAlchemy, Motor, PyMongo)
- Redis cache operations
- Full request/response bodies
- Stack traces for errors
Mode Switcher
Switch between Record/Replay/Off modes with one click:
- Status bar shows current mode
- Click to toggle
- Settings automatically updated
Quick Actions
Right-click any cassette for:
- Open Cassette — View raw JSON
- Copy Replay Command — Get the command to replay this cassette
- Show Timeline — Open visual timeline view
Requirements
- Timetracer Python package installed in your project
- Cassettes directory in your workspace (default:
./cassettes)
Installation
- Install this extension from the VS Code Marketplace
- Install the Timetracer Python package:
pip install timetracer[all]
- Record some cassettes in your Python API
- Open the Timetracer panel in the sidebar
Extension Settings
| Setting |
Description |
Default |
timetracer.cassetteDirectory |
Path to cassettes directory |
./cassettes |
timetracer.pythonPath |
Path to Python executable |
python |
timetracer.mode |
Current mode (off/record/replay) |
off |
Keyboard Shortcuts
| Shortcut |
Command |
Ctrl+Shift+T R |
Refresh cassettes |
Ctrl+Shift+T M |
Set mode |
Commands
| Command |
Description |
Timetracer: Refresh Cassettes |
Reload the cassettes list |
Timetracer: Set Mode |
Switch between off/record/replay |
Timetracer: Open Cassette |
View cassette JSON |
Timetracer: Copy Replay Command |
Copy replay command to clipboard |
Timetracer: Show Timeline |
Open timeline visualization |
Usage
Recording Cassettes
TIMETRACER_MODE=record uvicorn app:app
Or set the mode via the extension and run your app normally.
Replaying Cassettes
- Right-click a cassette in the explorer
- Select "Copy Replay Command"
- Paste and run in terminal
Or:
TIMETRACER_MODE=replay TIMETRACER_CASSETTE=./cassettes/2026-01-24/GET__users.json uvicorn app:app
Contributing
Issues and pull requests welcome at github.com/usv240/timetracer-vscode
License
MIT
| |