evaluateOnCallFrame method
Evaluates expression on a given call frame.
callFrameId
: Call frame identifier to evaluate onexpression
: Expression to evaluatereturnByValue
: Whether the result is expected to be a JSON object that should be sent by value
Implementation
Future<RemoteObject> evaluateOnCallFrame(
String callFrameId,
String expression, {
bool? returnByValue,
}) async {
Map<String, dynamic> params = {
'callFrameId': callFrameId,
'expression': expression,
};
if (returnByValue != null) {
params['returnByValue'] = returnByValue;
}
final WipResponse response =
await sendCommand('Debugger.evaluateOnCallFrame', params: params);
if (response.result!.containsKey('exceptionDetails')) {
throw ExceptionDetails(
response.result!['exceptionDetails'] as Map<String, dynamic>);
} else {
return RemoteObject(response.result!['result'] as Map<String, dynamic>);
}
}