setBreakpoint
Set a JavaScript breakpoint at a specific script URL and line number via CDP, no source edits needed. Use exact URL or regex match, then reload the page to activate.
Instructions
Set a breakpoint at a specific script URL and line number via CDP — no source code modification needed. Use a full URL (https://...) for exact match, or a partial filename/keyword for regex match. Alternative to inserting debugger; when you cannot modify the source file. After setting, call reloadPage() to ensure the breakpoint resolves correctly.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"line": "<line>"
},
"name": "setBreakpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Script URL or URL pattern to match | |
| line | Yes | 0-based line number | |
| column | No | 0-based column number | |
| condition | No | Conditional breakpoint expression |