Note
Bug Black Box is a premium flight recorder for web applications, packaged as a lightweight Chrome Extension. It captures user interaction flows, console logs, runtime errors, failed network requests, and active viewport screenshots to automatically generate structured bug reports.
graph LR
Start([⏺ Start Recording]) --> ThaoTac[User Interacts / App Throws Logs]
ThaoTac --> Capture[Engine records clicks, console logs, network errors, & focus states]
Capture --> Stop([⏹ Stop Recording])
Stop --> Snapshot[Capture Viewport Screenshot]
Snapshot --> Report[Generate Report v3 JSON/Markdown]
- Start/Stop UI: Clean status indicator and real-time timer in the popup interface.
- Console Capture: Records
console.log,console.warn, andconsole.errorwith high-precision timestamping. - JS Exception Capture: Intercepts unhandled runtime exceptions (
window.onerrorand rejected promises). - Interaction Click-Trail: Chronological tracking of target selectors without leaking user inputs.
- Failed Request Logging: Monitors status
>= 400network requests and connection aborts. - AI Explain Integration: Translates complex runtime stack traces into plain English explanations via AI.
- Dual Export: Instantly exports reports as clean, standalone Markdown
.mdor raw JSON.json.
- Open Google Chrome and navigate to
chrome://extensions. - Toggle Developer mode on at the top-right corner.
- Click Load unpacked on the top-left.
- Select the directory:
bug-black-box - Pin the Bug Black Box icon to your toolbar for quick access.
Important
File Access: If you want to record local .html files opened using file:// protocols, ensure you toggle Allow access to file URLs on for Bug Black Box in chrome://extensions.
Bug Black Box allows developers to trace complex issues that span across multiple tabs during a single session:
- Focus Timelines: Tracks when tabs are entered or left, storing them under
activeRanges. - Event Correlation: Group clicks, console logs, and related network activities automatically.
- Spam Flagging: Flags UI elements receiving heavy repetitive user clicks (
isSpam: true). - Global Synchronization: Maps all events chronologically in a
globalTimelineusing relative timestamp markers, allowing seamless cross-tab visual replays.
- Sensitive Field Masking: Headers, URLs, and bodies containing keywords like
password,token,secret,authorization,cookie,apiKey, orsessionare automatically masked to[redacted]. - Input Text Shielding: Click events do not record input contents, textareas, or content-editable containers. They only store the target selector path (e.g.,
input[type="password"]). - Local Storage Cache: Data is cached in
chrome.storage.local. No external server uploads or analytical calls are performed. - Local Storage Cache: Data is cached in
chrome.storage.local. No external server uploads or analytical calls are performed.
Use this flow before release QA for Capture Engine 2.0.
From the repository root:
python -m http.server 8080Open:
http://127.0.0.1:8080/test-pages/phase-1-replay.html
The legacy smoke-test page is still available at:
http://127.0.0.1:8080/test-page.html
- Login form with email, password, token, and textarea fields.
- Fake sensitive values:
fake-password-123,fake-token-123,fake-api-key-123, textarea secret, and contenteditable secret. - Multi-step click flow.
console.log,console.warn, andconsole.error.- Thrown JavaScript error.
- Unhandled promise rejection.
- Failing network request with sensitive query params.
- Contenteditable privacy field.
- High-frequency DOM changes for replay/storage testing.
- A link that opens a second tab for All tabs recording.
- Load the unpacked extension from
bug-black-box. - Open the Phase 1 test page through localhost.
- Run a Current tab recording and trigger every button at least once.
- Stop recording, open replay, then verify play, pause, and seek.
- Export Markdown and JSON.
- Run an All tabs recording.
- Click the second-tab link, interact with both tabs, stop, and replay.
- Start DOM churn for a longer session and confirm storage truncation is graceful if limits are reached.
- Close one recorded tab before stopping and confirm report creation still succeeds.
- Try starting on
chrome://extensionsand confirm the popup shows a clear restricted-page error.
Complete the tracked checklist before Task 05 release QA:
.task/phase1/phase-1-privacy-checklist.md
The checklist must be verified against exported JSON and Markdown files, not only the popup UI. Search the exported files for every fake sensitive value and confirm there are no matches.
- Password, token, email, textarea, and contenteditable values are not stored raw.
- Sensitive URL query params are redacted to
[redacted]. - Debug events store selectors and safe labels, not form values.
- Replay has
maskAllInputsenabled. - Replay masks contenteditable text through
maskTextSelector. - Phase 1 data stays local in
chrome.storage.localand local exports unless the user explicitly uses AI Explain.