← Back to Debugger domain
Debugger.setBreakpointOnFunctionCall
Sets JavaScript breakpoint before each call to the given function.
If another function was created from the same source as a given one,
calling it will also trigger the breakpoint.
Domain: Debugger
experimental
Parameters
| Name | Type | Description |
objectId | Runtime.RemoteObjectId | Function object id. |
condition (optional) | string | Expression to use as a breakpoint condition. When specified, debugger will
stop on the breakpoint if this expression evaluates to true. |
Returns
| Name | Type | Description |
breakpointId | BreakpointId | Id of the created breakpoint for further reference. |
Example Request
{
"id": 1,
"method": "Debugger.setBreakpointOnFunctionCall",
"params": {
"objectId": "{\"injectedScriptId\":1,\"id\":1}"
}
}
Example Response
{
"id": 1,
"result": {
"breakpointId": "breakpointId-value"
}
}
Usage in Node.js
const result = await send('Debugger.setBreakpointOnFunctionCall', {"objectId": "{\"injectedScriptId\":1,\"id\":1}"});
console.log(result);
// {"breakpointId": "breakpointId-value"}