TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/szymdzum/browser-debugger-cli/llms.txt
Use this file to discover all available pages before exploring further.
bdg cdp command provides direct access to the Chrome DevTools Protocol (CDP), enabling you to execute any of the 300+ methods across 53 domains.
Quick Start
Syntax
CDP method name in the format
Domain.method (e.g., Network.getCookies, Page.navigate)Case-insensitive: network.getcookies works the same as Network.getCookiesDiscovery Flags
Before executing methods, use these flags to explore the available API surface.List Domains
List Domain Methods
Search Methods
Describe Method
- Parameter names, types, and whether they’re required
- Return value types
- Usage examples
- Special behavior notes (for event-based methods)
Execution
Simple Methods (No Parameters)
Methods with Parameters
Use--params with a JSON string:
- Use single quotes around the JSON string to avoid shell escaping issues
- If the JSON contains single quotes, use double quotes outside and escape inner quotes
Error Handling
If a method name is not found, bdg suggests similar methods:Options
Method parameters as a JSON stringExample:
--params '{"expression":"document.title"}'List all domains (without method argument) or all methods in a domain (with domain argument)Examples:
bdg cdp --list- List all domainsbdg cdp Network --list- List all Network methods
Show method signature, parameters, and return typesExample:
bdg cdp Network.getCookies --describeSearch methods by keywordExample:
bdg cdp --search cookieEvent-Based Methods
Some CDP methods trigger asynchronous operations where results arrive via events rather than immediate responses. When these methods return empty results, bdg provides contextual hints. Example:| Domain | Behavior | Alternative |
|---|---|---|
| Audits | Issues via Audits.issueAdded events | bdg dom eval with getComputedStyle() |
| Profiler | Data after Profiler.stop | Call start, perform actions, then stop |
| HeapProfiler | Events after takeHeapSnapshot | Collect events or use snapshots |
| Tracing | Data via Tracing.dataCollected | Call start, perform actions, then end |
| Overlay | Visual only, returns empty | Use Overlay.hideHighlight to clear |
--describe on these domains to see detailed notes about their behavior:
Blocked Methods
Certain methods are blocked from direct execution because they return large binary data that can corrupt terminal sessions:- Page.captureScreenshot - Use
bdg dom screenshotinstead
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 81 | Invalid arguments (method not found, invalid JSON) |
| 83 | Resource not found (domain not found) |
| 102 | CDP timeout |
Related Commands
bdg dom- High-level DOM inspection and interactionbdg network- Network request inspectionbdg console- Console message inspection
Learn More
- CDP Domains Reference - Major CDP domains and example methods
- Chrome DevTools Protocol Documentation - Official CDP reference

