sendCommand method

Future<Map?> sendCommand(
  1. DebuggerSession target,
  2. String method,
  3. Map? commandParams
)

Sends given command to the debugging target. target Debugging target to which you want to send the command. method Method name. Should be one of the methods defined by the remote debugging protocol. commandParams JSON object with request parameters. This object must conform to the remote debugging params scheme for given method. returns Response body. If an error occurs while posting the message, the promise will be rejected.

Implementation

Future<Map?> sendCommand(
  DebuggerSession target,
  String method,
  Map? commandParams,
) async {
  var $res = await $js.chrome.debugger
      .sendCommand(
        target.toJS,
        method,
        commandParams?.jsify(),
      )
      .toDart;
  return $res?.toDartMap();
}