evaluateOnCallFrame method

Future<RemoteObject> evaluateOnCallFrame(
  1. String callFrameId,
  2. String expression, {
  3. bool? returnByValue,
})

Evaluates expression on a given call frame.

  • callFrameId: Call frame identifier to evaluate on
  • expression: Expression to evaluate
  • returnByValue: 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>);
  }
}