> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browspark.krishm.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# devtools_debugger

> JavaScript debugger.

JavaScript debugger. Breakpoints: set (by url/scriptId or original source via source map; line 1-based; optional condition or logMessage), remove, enable, disable, list; exceptions (none|uncaught|all); dom (subtree-modified|attribute-modified|node-removed on a ref/selector); event (listener breakpoints, e.g. "click"); xhr (URL substring). Execution: pause, resume, stepInto, stepOver, stepOut, continueTo. Inspection while paused: stack (sync+async, mapped to original sources), scope (variables of frame/scope), variables (all scopes of a frame), evaluate/watch (expressions in a frame), setVariable. blackbox ignores library scripts while stepping.

## Parameters

<ParamField body="tabId" type="integer">
  Target tab id from browser\_tabs, which lists tabs across all windows. Defaults to the agent's most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
</ParamField>

<ParamField body="action" type="enum" required>
  One of: `list`, `set`, `remove`, `enable`, `disable`, `exceptions`, `dom`, `event`, `xhr`, `pause`, `resume`, `stepInto`, `stepOver`, `stepOut`, `continueTo`, `stack`, `scope`, `variables`, `evaluate`, `watch`, `setVariable`, `blackbox`, `breakOnAsync`.
</ParamField>

<ParamField body="url" type="string">
  Script URL (exact or substring) for set/continueTo
</ParamField>

<ParamField body="scriptId" type="string">
   
</ParamField>

<ParamField body="source" type="string">
  Original source path (source-mapped) for set/continueTo
</ParamField>

<ParamField body="line" type="integer">
  1-based
</ParamField>

<ParamField body="column" type="integer">
   
</ParamField>

<ParamField body="condition" type="string">
   
</ParamField>

<ParamField body="logMessage" type="string">
  Logpoint: log this expression instead of pausing
</ParamField>

<ParamField body="breakpointId" type="string">
   
</ParamField>

<ParamField body="all" type="boolean">
   
</ParamField>

<ParamField body="state" type="enum">
  For exceptions One of: `none`, `uncaught`, `all`.
</ParamField>

<ParamField body="ref" type="string">
  Element ref from browser\_snapshot, e.g. "e12"
</ParamField>

<ParamField body="selector" type="string">
   
</ParamField>

<ParamField body="domType" type="enum">
  One of: `subtree-modified`, `attribute-modified`, `node-removed`.
</ParamField>

<ParamField body="eventName" type="string">
   
</ParamField>

<ParamField body="targetName" type="string">
  Optional event target interface, e.g. "xmlhttprequest", "window"
</ParamField>

<ParamField body="urlSubstring" type="string">
  For xhr breakpoints
</ParamField>

<ParamField body="remove" type="boolean">
  For dom/event/xhr: remove instead of set
</ParamField>

<ParamField body="frameIndex" type="integer">
   
</ParamField>

<ParamField body="scopeIndex" type="integer">
   
</ParamField>

<ParamField body="name" type="string">
  Variable name for setVariable
</ParamField>

<ParamField body="expression" type="string">
   
</ParamField>

<ParamField body="expressions" type="string[]">
   
</ParamField>

<ParamField body="patterns" type="string[]">
  Blackbox regexes, e.g. \["node\_modules", "vendor\\.js"]
</ParamField>

<ParamField body="depth" type="integer">
  Range: 0 to 3.
</ParamField>

<ParamField body="timeoutMs" type="integer">
   
</ParamField>

<ParamField body="maxDepth" type="integer">
  For breakOnAsync: async stack depth (default 8)
</ParamField>

## Example

```json Conditional breakpoint in the original source theme={null}
{
  "tabId": 1234,
  "action": "set",
  "source": "src/cart.ts",
  "line": 42,
  "condition": "item.qty > 1"
}
```

```json Break on uncaught exceptions theme={null}
{
  "tabId": 1234,
  "action": "exceptions",
  "state": "uncaught"
}
```

```json Break when a request URL contains /checkout theme={null}
{
  "tabId": 1234,
  "action": "xhr",
  "urlSubstring": "/checkout"
}
```

```json While paused: stack, then step theme={null}
{
  "tabId": 1234,
  "action": "stack"
}
```

```json theme={null}
{
  "tabId": 1234,
  "action": "stepOver"
}
```
