← Back to Debugger domain
Debugger.setBreakpoint
Sets JavaScript breakpoint at a given location.
Domain: Debugger
stable
Parameters
| Name | Type | Description |
location | Location | Location to set breakpoint in. |
condition (optional) | string | Expression to use as a breakpoint condition. When specified, debugger will only stop on the
breakpoint if this expression evaluates to true. |
Returns
| Name | Type | Description |
breakpointId | BreakpointId | Id of the created breakpoint for further reference. |
actualLocation | Location | Location this breakpoint resolved into. |
Example Request
{
"id": 1,
"method": "Debugger.setBreakpoint",
"params": {
"location": "location-value"
}
}
Example Response
{
"id": 1,
"result": {
"breakpointId": "breakpointId-value",
"actualLocation": "actualLocation-value"
}
}
Usage in Node.js
const result = await send('Debugger.setBreakpoint', {"location": "location-value"});
console.log(result);
// {"breakpointId": "breakpointId-value", "actualLocation": "actualLocation-value"}