handleDebugEvent method

  1. @protected
  2. @mustCallSuper
Future<void> handleDebugEvent(
  1. Event event
)

Implementation

@protected
@mustCallSuper
Future<void> handleDebugEvent(vm.Event event) async {
  // Delay processing any events until the debugger initialization has
  // finished running, as events may arrive (for ex. IsolateRunnable) while
  // it's doing is own initialization that this may interfere with.
  await debuggerInitialized;

  await isolateManager.handleEvent(event);

  final eventKind = event.kind;
  final isolate = event.isolate;
  // We pause isolates on exit to allow requests for resolving URIs in
  // stderr call stacks, so when we see an isolate pause, wait for any
  // pending logs and then resume it (so it exits).
  if (resumeIsolatesAfterPauseExit &&
      eventKind == vm.EventKind.kPauseExit &&
      isolate != null) {
    await _waitForPendingOutputEvents();
    await isolateManager.resumeIsolate(isolate);
  }
}