Skip to main content
Glama
chrome-dev-mcp

chrome-dev-mcp

get_debugger_state

Read-only

Retrieves the current debugger state—paused status, pause reason, hit breakpoints, and full call stack—to help inspect and diagnose paused JavaScript execution.

Instructions

Get the debugger state: whether execution is paused, the pause reason, hit breakpoints and the full call stack. A pause is reported whatever caused it. hitBreakpoints lists only breakpoints set through this server, so it is empty at a breakpoint set in DevTools. Positions are 1-based, and source-mapped where the script has a source map. A source-mapped frame also gives compiledUrl/compiledLine/compiledColumn, its position in the loaded script.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
noteNo
pausedYes
reasonNoPause reason (e.g. "other" for a breakpoint, "step", "exception"). Present only when paused.
callStackNoSource-mapped positions when available. Present only when paused.
hitBreakpointsNoIDs of breakpoints hit. Present only when paused.
droppedBreakpointsNoBreakpoints set by `source` whose file has changed since: removed, and reported here once.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.0.0
    • addedOutput schema / properties / callStack / items / properties / compiledColumn
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / droppedBreakpoints
      Added value: +{
      +  "description": "Breakpoints set by `source` whose file has changed since: removed, and reported here once.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "breakpointId": {
      +        "type": "string"
      +      },
      +      "location": {
      +        "type": "string"
      +      },
      +      "reason": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "breakpointId",
      +      "location",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / note
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / reason / description
      Previous value: -"Pause reason (e.g. \"breakpoint\", \"exception\"). Present only when paused."New value: +"Pause reason (e.g. \"other\" for a breakpoint, \"step\", \"exception\"). Present only when paused."
  2. Changed1 schema field changedv1.3.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "callStack": {
      +      "description": "Source-mapped positions when available. Present only when paused.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "columnNumber": {
      +            "type": "number"
      +          },
      +          "compiledLine": {
      +            "type": "number"
      +          },
      +          "compiledUrl": {
      +            "type": "string"
      +          },
      +          "functionName": {
      +            "type": "string"
      +          },
      +          "index": {
      +            "type": "number"
      +          },
      +          "lineNumber": {
      +            "type": "number"
      +          },
      +          "scopeTypes": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "index",
      +          "functionName",
      +          "url",
      +          "lineNumber",
      +          "columnNumber",
      +          "scopeTypes"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "hitBreakpoints": {
      +      "description": "IDs of breakpoints hit. Present only when paused.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "paused": {
      +      "type": "boolean"
      +    },
      +    "reason": {
      +      "description": "Pause reason (e.g. \"breakpoint\", \"exception\"). Present only when paused.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "paused"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.1.0

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With readOnlyHint already declaring the safety profile, the description adds substantial non-obvious behavior: pauses are reported regardless of cause, hitBreakpoints only reflects breakpoints set through this server and is therefore empty at DevTools breakpoints, positions are 1-based, and source-mapped frames expose compiledUrl/compiledLine/compiledColumn. These are exactly the traps an agent would otherwise misread as 'no breakpoint hit'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five tight sentences, front-loaded with the returned data before the caveats. Every sentence carries distinct information — content, reporting guarantee, breakpoint-source caveat, coordinate convention, source-map extras — with no restatement of the name or title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value shape need not be spelled out here, and the description still pre-explains the trickiest fields. The one gap is environmental: it never states prerequisites (e.g., that a tab must be inspected/attached) for the state to be meaningful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for the description to disambiguate beyond the schema. Baseline for a no-parameter tool is 4; the description does not need to add more.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb plus resource ('Get the debugger state') immediately followed by an enumeration of exactly what is included: paused status, pause reason, hit breakpoints, full call stack. This clearly separates it from siblings such as list_breakpoints (breakpoint inventory) and get_scope_variables (frame variables).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the agent must infer this is the tool to call when it needs to know if/where execution is paused. There is no explicit routing statement such as 'call before step_over/evaluate_at_frame' or guidance on when to prefer list_breakpoints or get_scope_variables. The 'hitBreakpoints' caveat is a data caveat rather than a when-to-use rule.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.