Your First Session
Get started with bdg in three simple steps:Start a debugging session
Launch Chrome and connect to any website:This will:
- Launch Chrome in the background
- Navigate to the URL
- Establish a CDP connection
- Start collecting telemetry data
The session runs in the background. Your terminal is free for other commands.
Common Commands
Here are the most frequently used commands to get you started:Session Management
DOM Inspection
Network Monitoring
Live Monitoring
Real-World Example
Let’s debug a real website and inspect its network activity:Check what loaded
View network requests:This shows the most recent network requests with status codes and URLs.
Find all links
Query for links on the page:You’ll see a list of all story links with their text content.
Extract article titles
Use JavaScript evaluation to get titles:Returns a JSON array of all article titles.
Check for errors
Look for console errors or warnings:Shows any JavaScript errors or console messages.
Export network data
Save network activity for analysis:Creates a HAR file you can open in Chrome DevTools.
Advanced Options
Headless Mode
Run Chrome without a visible window:Custom Chrome Flags
Pass flags to Chrome for special scenarios:Connect to Existing Chrome
Connect to a Chrome instance you already have running:Understanding Output
JSON Output
All commands support--json for programmatic use:
Exit Codes
bdg uses semantic exit codes for error handling:- 0 — Success
- 80-99 — User errors (invalid arguments, resources not found)
- 100-119 — System errors (timeouts, connection failures)
See the Exit Codes reference for complete details.
Working with Pipes
bdg works seamlessly with Unix pipes and jq:Next Steps
Now that you’ve completed your first session, explore these topics:Session Lifecycle
Learn how sessions work under the hood
DOM Inspection Guide
Deep dive into querying and inspecting elements
Network Monitoring
Master request filtering and HAR exports
CDP Access
Execute any Chrome DevTools Protocol method
For AI Agents
Discover agent-optimized features
Command Reference
Complete reference for all commands
Need Help?
If you run into issues:Troubleshooting
Common problems and solutions
GitHub Issues
Report bugs or request features
GitHub Discussions
Ask questions and share ideas
Examples
Learn from real-world recipes

