devtape-browser
v0.1.4
Published
DevTape browser SDK — capture fetch failures, console errors, clicks, and navigation into a causal debug timeline (development only)
Downloads
928
Maintainers
Readme
devtape-browser
DevTape browser SDK — capture fetch failures, console errors, clicks, and navigation into a causal debug timeline (development only).
Install
npm install devtape-browserUsage
import { initFailureRecorder } from "devtape-browser";
const capture = initFailureRecorder({
enabled: process.env.NODE_ENV === "development",
overlay: true,
redaction: { keys: ["authorization", "cookie", "password", "token"] },
failedStatuses: [401, 403, 500],
});
// After a failure:
const bundle = capture.recorder?.getLastFrozen();
capture.dispose();Captured signals
window.onerrorand unhandled promise rejectionsconsole.warnandconsole.errorfetchmetadata (method, URL, status, duration — no bodies)- Navigation (initial load, history, hash changes)
- User interactions are off by default. Set
captureInteractions: trueto record actionable clicks (buttons, links, submits) and form submits. DevTape never records typing (input/keydown). Overlay clicks are always ignored. - Redacted DOM snapshot on freeze
Safety
- Refuses production initialization unless
allowProduction: true - SSR-safe imports (returns a disabled handle on the server)
- All data stays in browser memory
Related packages
Use devtape-react for React apps, or devtape-viewer to mount the overlay manually.
License
MIT
