attach method

Future<void> attach(
  1. Debuggee target,
  2. String requiredVersion
)

Attaches debugger to the given target. target Debugging target to which you want to attach. requiredVersion Required debugging protocol version ("0.1"). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained here. returns Called once the attach operation succeeds or fails. Callback receives no arguments. If the attach fails, runtime.lastError will be set to the error message.

Implementation

Future<void> attach(
  Debuggee target,
  String requiredVersion,
) async {
  await promiseToFuture<void>($js.chrome.debugger.attach(
    target.toJS,
    requiredVersion,
  ));
}