@@ -1135,25 +1135,6 @@ void main() {
1135
1135
expect (stack.truncated, isFalse);
1136
1136
});
1137
1137
1138
- test ('break on exceptions with legacy setExceptionPauseMode' , () async {
1139
- final oldPauseMode =
1140
- (await service.getIsolate (isolateId! )).exceptionPauseMode! ;
1141
- await service.setExceptionPauseMode (
1142
- isolateId! , ExceptionPauseMode .kAll);
1143
- // Wait for pausing to actually propagate.
1144
- final event = await stream
1145
- .firstWhere ((event) => event.kind == EventKind .kPauseException);
1146
- expect (event.exception, isNotNull);
1147
- // Check that the exception stack trace has been mapped to Dart source files.
1148
- expect (event.exception! .valueAsString, contains ('main.dart' ));
1149
-
1150
- final stack = await service.getStack (isolateId! );
1151
- expect (stack, isNotNull);
1152
-
1153
- await service.setExceptionPauseMode (isolateId! , oldPauseMode);
1154
- await service.resume (isolateId! );
1155
- });
1156
-
1157
1138
test ('break on exceptions with setIsolatePauseMode' , () async {
1158
1139
final oldPauseMode =
1159
1140
(await service.getIsolate (isolateId! )).exceptionPauseMode;
@@ -1492,17 +1473,25 @@ void main() {
1492
1473
await expectLater (service.reloadSources ('' ), throwsRPCError);
1493
1474
});
1494
1475
1495
- test ('setExceptionPauseMode ' , () async {
1476
+ test ('setIsolatePauseMode ' , () async {
1496
1477
final vm = await service.getVM ();
1497
1478
final isolateId = vm.isolates! .first.id! ;
1498
- expect (await service.setExceptionPauseMode (isolateId, 'all' ), _isSuccess);
1499
- expect (await service.setExceptionPauseMode (isolateId, 'unhandled' ),
1479
+ expect (
1480
+ await service.setIsolatePauseMode (isolateId,
1481
+ exceptionPauseMode: ExceptionPauseMode .kAll),
1482
+ _isSuccess);
1483
+ expect (
1484
+ await service.setIsolatePauseMode (isolateId,
1485
+ exceptionPauseMode: ExceptionPauseMode .kUnhandled),
1500
1486
_isSuccess);
1501
1487
// Make sure this is the last one - or future tests might hang.
1502
1488
expect (
1503
- await service.setExceptionPauseMode (isolateId, 'none' ), _isSuccess);
1489
+ await service.setIsolatePauseMode (isolateId,
1490
+ exceptionPauseMode: ExceptionPauseMode .kNone),
1491
+ _isSuccess);
1504
1492
await expectLater (
1505
- service.setExceptionPauseMode (isolateId, 'invalid' ), throwsRPCError);
1493
+ service.setIsolatePauseMode (isolateId, exceptionPauseMode: 'invalid' ),
1494
+ throwsRPCError);
1506
1495
});
1507
1496
1508
1497
test ('setFlag' , () async {
0 commit comments