Skip to main content

Overview

Retrieve complete details for a specific network request or console message, including headers, body content, and timing information.

Syntax

bdg details <type> <id> [options]

Arguments

type
string
required
Type of item to inspect. Must be either network or console.
bdg details network <requestId>
bdg details console <index>
id
string
required
Identifier for the item:
  • For network: Request ID (e.g., "1234.1")
  • For console: Message index (0-based integer)
# Network request by ID
bdg details network "1234.1"

# Console message by index
bdg details console 0

Options

--json
boolean
default:"false"
Output as JSON instead of human-readable format.
bdg details network "1234.1" --json
bdg details console 0 --json

Output Format

Network Request Details

Human-readable format:
Network Request Details
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Request ID    1234.1
URL           https://api.example.com/users
Method        GET
Status        200
Resource Type XHR
MIME Type     application/json

Request Headers:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Accept: application/json
  Authorization: Bearer eyJhbGc...
  Content-Type: application/json
  User-Agent: Mozilla/5.0...

Request Body:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{"page": 1, "limit": 20}

Response Headers:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Cache-Control: no-cache
  Content-Type: application/json
  X-RateLimit-Limit: 1000
  X-RateLimit-Remaining: 999

Response Body:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  "users": [
    {"id": 1, "name": "Alice"},
    {"id": 2, "name": "Bob"}
  ],
  "total": 2
}
JSON format:
{
  "version": "0.5.1",
  "success": true,
  "data": {
    "type": "network",
    "item": {
      "requestId": "1234.1",
      "url": "https://api.example.com/users",
      "method": "GET",
      "status": 200,
      "resourceType": "XHR",
      "mimeType": "application/json",
      "requestHeaders": {
        "Accept": "application/json",
        "Authorization": "Bearer eyJhbGc...",
        "Content-Type": "application/json"
      },
      "requestBody": "{\"page\": 1, \"limit\": 20}",
      "responseHeaders": {
        "Cache-Control": "no-cache",
        "Content-Type": "application/json",
        "X-RateLimit-Limit": "1000",
        "X-RateLimit-Remaining": "999"
      },
      "responseBody": "{\"users\": [{\"id\": 1, \"name\": \"Alice\"}, {\"id\": 2, \"name\": \"Bob\"}], \"total\": 2}"
    }
  }
}

Console Message Details

Human-readable format:
Console Message Details
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Type         error
Timestamp    2025-11-06T12:00:00.123Z
Text         Failed to fetch user data

Arguments:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  [0]: "Failed to fetch user data"
  [1]: {
    "error": {
      "code": "NETWORK_ERROR",
      "message": "Connection timeout"
    }
  }
JSON format:
{
  "version": "0.5.1",
  "success": true,
  "data": {
    "type": "console",
    "item": {
      "type": "error",
      "timestamp": 1699272000123,
      "text": "Failed to fetch user data",
      "args": [
        "Failed to fetch user data",
        {
          "error": {
            "code": "NETWORK_ERROR",
            "message": "Connection timeout"
          }
        }
      ]
    }
  }
}

Examples

Network Request Details

Find request ID from peek:
# Step 1: List requests to find ID
bdg peek --network --json | jq '.data.preview.data.network[0].requestId'
# Output: "1234.1"

# Step 2: Get full details
bdg details network "1234.1"
Inspect specific request:
bdg details network "1234.1"
Get JSON output for processing:
bdg details network "1234.1" --json
Extract specific headers:
bdg details network "1234.1" --json | jq '.data.item.responseHeaders["Content-Type"]'
Check response body:
bdg details network "1234.1" --json | jq -r '.data.item.responseBody' | jq '.'

Console Message Details

Find message index from peek:
# Step 1: List console messages
bdg peek --console
# Output shows messages with implicit indices [0], [1], [2]...

# Step 2: Get details for first message
bdg details console 0
Inspect console error:
bdg details console 0
Get JSON output:
bdg details console 0 --json
Extract error arguments:
bdg details console 0 --json | jq '.data.item.args'

Finding Item Identifiers

Network Request IDs

Request IDs are assigned by Chrome DevTools Protocol and can be found using: From bdg peek:
bdg peek --network --json | jq -r '.data.preview.data.network[].requestId'
From bdg network list:
bdg network list --json | jq -r '.data.requests[].requestId'

Console Message Indices

Console messages use 0-based indices in the order they were captured: From bdg peek:
# Human-readable shows implicit indices
bdg peek --console

# JSON shows array with indices
bdg peek --console --json | jq '.data.preview.data.console | to_entries[] | {index: .key, type: .value.type, text: .value.text}'
From bdg console:
bdg console --list

Use Cases

Debug Failed API Requests

# Find failed requests
bdg peek --network --json | jq '.data.preview.data.network[] | select(.status >= 400) | .requestId'

# Get details for specific failure
bdg details network "1234.1"

# Check response headers for CORS/CSP issues
bdg details network "1234.1" --json | jq '.data.item.responseHeaders'

Inspect Console Errors

# List console errors
bdg console --json | jq '.data.messages[] | select(.type == "error") | .text'

# Get full error details with stack trace
bdg details console 0

# Extract error arguments for processing
bdg details console 0 --json | jq '.data.item.args'

Analyze Request/Response Bodies

# Check POST request body
bdg details network "1234.1" --json | jq -r '.data.item.requestBody' | jq '.'

# Validate response structure
bdg details network "1234.1" --json | jq -r '.data.item.responseBody' | jq 'keys'

# Extract specific fields from response
bdg details network "1234.1" --json | jq -r '.data.item.responseBody' | jq '.users[].name'

Security Header Inspection

# Check Content-Security-Policy
bdg details network "1234.1" --json | jq -r '.data.item.responseHeaders["Content-Security-Policy"]'

# Verify CORS headers
bdg details network "1234.1" --json | jq '.data.item.responseHeaders | with_entries(select(.key | startswith("Access-Control")))'

# Check auth tokens
bdg details network "1234.1" --json | jq -r '.data.item.requestHeaders.Authorization'

Exit Codes

0
SUCCESS
Command completed successfully.
81
INVALID_ARGUMENTS
Invalid type argument.Common causes:
  • Type is not network or console
  • Missing required arguments
Solution: Use bdg details network <requestId> or bdg details console <index>
83
RESOURCE_NOT_FOUND
Item not found.Common causes:
  • Request ID does not exist
  • Console message index out of range
  • No active session
Solutions:
  • For network: Use bdg peek --network to see available request IDs
  • For console: Use bdg peek --console to see available message indices
  • Check session is active: bdg status
101
CDP_CONNECTION_FAILURE
Cannot connect to daemon.Solution: Check session status with bdg status

Tips

Combine bdg peek --json with jq to quickly find the request ID you need before calling bdg details.
For network requests, use bdg network headers if you only need header information (faster than full details).
Response bodies may be truncated based on the --max-body-size setting (default: 5MB). Large responses will show partial content.

Build docs developers (and LLMs) love