← Back to Debugger domain
Debugger.evaluateOnCallFrame
Evaluates expression on a given call frame.
Domain: Debugger
stable
Parameters
| Name | Type | Description |
callFrameId | CallFrameId | Call frame identifier to evaluate on. |
expression | string | Expression to evaluate. |
objectGroup (optional) | string | String object group name to put result into (allows rapid releasing resulting object handles
using `releaseObjectGroup`). |
includeCommandLineAPI (optional) | boolean | Specifies whether command line API should be available to the evaluated expression, defaults
to false. |
silent (optional) | boolean | In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state. |
returnByValue (optional) | boolean | Whether the result is expected to be a JSON object that should be sent by value. |
generatePreview (optional) | boolean | Whether preview should be generated for the result. |
throwOnSideEffect (optional) | boolean | Whether to throw an exception if side effect cannot be ruled out during evaluation. |
timeout (optional) | Runtime.TimeDelta | Terminate execution after timing out (number of milliseconds). |
Returns
| Name | Type | Description |
result | Runtime.RemoteObject | Object wrapper for the evaluation result. |
exceptionDetails | Runtime.ExceptionDetails | Exception details. |
Example Request
{
"id": 1,
"method": "Debugger.evaluateOnCallFrame",
"params": {
"callFrameId": "0",
"expression": "document.title"
}
}
Example Response
{
"id": 1,
"result": {
"result": {
"type": "string",
"value": "Example Domain"
},
"exceptionDetails": "exceptionDetails-value"
}
}
Usage in Node.js
const result = await send('Debugger.evaluateOnCallFrame', {"callFrameId": "0", "expression": "document.title"});
console.log(result);
// {"result": {"type": "string", "value": "Example Domain"}, "exceptionDetails": "exceptionDetails-value"}