← 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

NameTypeDescription
objectIdRuntime.RemoteObjectIdFunction object id.
condition (optional)stringExpression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true.

Returns

NameTypeDescription
breakpointIdBreakpointIdId 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"}