setIsolatePauseMode method Null safety

  1. @override
Future<Success> setIsolatePauseMode(
  1. String isolateId,
  2. {String? exceptionPauseMode,
  3. bool? shouldPauseOnExit}

The setIsolatePauseMode RPC is used to control if or when an isolate will pause due to a change in execution state.

The shouldPauseOnExit parameter specify whether the target isolate should pause on exit.

The setExceptionPauseMode RPC is used to control if an isolate pauses when an exception is thrown.

NoneDo not pause isolate on thrown exceptions
UnhandledPause isolate on unhandled exceptions
AllPause isolate on all thrown exceptions

If isolateId refers to an isolate which has exited, then the Collected Sentinel is returned.

This method will throw a SentinelException in the case a Sentinel is returned.


Future<Success> setIsolatePauseMode(String isolateId,
        {/*ExceptionPauseMode*/ String? exceptionPauseMode,
        bool? shouldPauseOnExit}) =>
    _call('setIsolatePauseMode', {
      'isolateId': isolateId,
      if (exceptionPauseMode != null)
        'exceptionPauseMode': exceptionPauseMode,
      if (shouldPauseOnExit != null) 'shouldPauseOnExit': shouldPauseOnExit,