What problem does it solve?
Iterative debugging with targeted logs. Use when browser connections fail, traffic capture returns empty, proxy routes return errors, WebSocket issues, or any problem that can't be solved on the first attempt. Add logs, read output, narrow the search, repeat until fixed, then clean up.
Core Features & Use Cases
- Canonical DEBUG() functionality with separate server/API and client contexts to control observability.
- Deferred evaluation via a factory function to avoid expensive computation when logging is disabled.
- Flexible call signatures supporting simple messages, location tagging, and value objects for lazy evaluation.
- Output to /tmp/interceptor-debug and console (cyan) for quick visibility.
- Structured debugging workflow: hypothesize, instrument targeted logs, reproduce, read logs, and iterate across code paths such as HTTP, WebSocket, and UI interactions.
Quick Start
Enable DEBUG in your code, place targeted DEBUG() calls at suspected points, reproduce the issue, and read the logs under /tmp/interceptor-debug.