sendCommand method

Future<Map?> sendCommand(
  1. Debuggee 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 callback will be called with no arguments and runtime.lastError will be set to the error message.

Implementation

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