@@ -26,7 +26,7 @@ export 'snapshot_graph.dart'
2626 HeapSnapshotObjectNoData,
2727 HeapSnapshotObjectNullData;
2828
29- const String vmServiceVersion = '3.52 .0' ;
29+ const String vmServiceVersion = '3.53 .0' ;
3030
3131/// @optional
3232const String optional = 'optional' ;
@@ -236,6 +236,7 @@ Map<String, List<String>> _methodReturnTypes = {
236236 'resume' : const ['Success' ],
237237 'setBreakpointState' : const ['Breakpoint' ],
238238 'setExceptionPauseMode' : const ['Success' ],
239+ 'setIsolatePauseMode' : const ['Success' ],
239240 'setFlag' : const ['Success' , 'Error' ],
240241 'setLibraryDebuggable' : const ['Success' ],
241242 'setName' : const ['Success' ],
@@ -1078,9 +1079,34 @@ abstract class VmServiceInterface {
10781079 ///
10791080 /// This method will throw a [SentinelException] in the case a [Sentinel] is
10801081 /// returned.
1082+ @Deprecated ('Use setIsolatePauseMode instead' )
10811083 Future <Success > setExceptionPauseMode (
10821084 String isolateId, /*ExceptionPauseMode*/ String mode);
10831085
1086+ /// The `setIsolatePauseMode` RPC is used to control if or when an isolate
1087+ /// will pause due to a change in execution state.
1088+ ///
1089+ /// The `shouldPauseOnExit` parameter specify whether the target isolate
1090+ /// should pause on exit.
1091+ ///
1092+ /// The `setExceptionPauseMode` RPC is used to control if an isolate pauses
1093+ /// when an exception is thrown.
1094+ ///
1095+ /// mode | meaning
1096+ /// ---- | -------
1097+ /// None | Do not pause isolate on thrown exceptions
1098+ /// Unhandled | Pause isolate on unhandled exceptions
1099+ /// All | Pause isolate on all thrown exceptions
1100+ ///
1101+ /// If `isolateId` refers to an isolate which has exited, then the `Collected`
1102+ /// [Sentinel] is returned.
1103+ ///
1104+ /// This method will throw a [SentinelException] in the case a [Sentinel] is
1105+ /// returned.
1106+ Future <Success > setIsolatePauseMode (String isolateId,
1107+ {/*ExceptionPauseMode*/ String ? exceptionPauseMode,
1108+ bool ? shouldPauseOnExit});
1109+
10841110 /// The `setFlag` RPC is used to set a VM flag at runtime. Returns an error if
10851111 /// the named flag does not exist, the flag may not be set at runtime, or the
10861112 /// value is of the wrong type for the flag.
@@ -1101,6 +1127,7 @@ abstract class VmServiceInterface {
11011127 /// provided value. If set to false when the profiler is already running, the
11021128 /// profiler will be stopped but may not free its sample buffer depending on
11031129 /// platform limitations.
1130+ /// - Isolate pause settings will only be applied to newly spawned isolates.
11041131 ///
11051132 /// See [Success] .
11061133 ///
@@ -1549,11 +1576,19 @@ class VmServerConnection {
15491576 );
15501577 break ;
15511578 case 'setExceptionPauseMode' :
1579+ // ignore: deprecated_member_use_from_same_package
15521580 response = await _serviceImplementation.setExceptionPauseMode (
15531581 params! ['isolateId' ],
15541582 params['mode' ],
15551583 );
15561584 break ;
1585+ case 'setIsolatePauseMode' :
1586+ response = await _serviceImplementation.setIsolatePauseMode (
1587+ params! ['isolateId' ],
1588+ exceptionPauseMode: params['exceptionPauseMode' ],
1589+ shouldPauseOnExit: params['shouldPauseOnExit' ],
1590+ );
1591+ break ;
15571592 case 'setFlag' :
15581593 response = await _serviceImplementation.setFlag (
15591594 params! ['name' ],
@@ -2081,11 +2116,23 @@ class VmService implements VmServiceInterface {
20812116 'enable' : enable
20822117 });
20832118
2119+ @Deprecated ('Use setIsolatePauseMode instead' )
20842120 @override
20852121 Future <Success > setExceptionPauseMode (
20862122 String isolateId, /*ExceptionPauseMode*/ String mode) =>
20872123 _call ('setExceptionPauseMode' , {'isolateId' : isolateId, 'mode' : mode});
20882124
2125+ @override
2126+ Future <Success > setIsolatePauseMode (String isolateId,
2127+ {/*ExceptionPauseMode*/ String ? exceptionPauseMode,
2128+ bool ? shouldPauseOnExit}) =>
2129+ _call ('setIsolatePauseMode' , {
2130+ 'isolateId' : isolateId,
2131+ if (exceptionPauseMode != null )
2132+ 'exceptionPauseMode' : exceptionPauseMode,
2133+ if (shouldPauseOnExit != null ) 'shouldPauseOnExit' : shouldPauseOnExit,
2134+ });
2135+
20892136 @override
20902137 Future <Response > setFlag (String name, String value) =>
20912138 _call ('setFlag' , {'name' : name, 'value' : value});
0 commit comments