Skip to content

Commit c7574be

Browse files
authored
add another print trace to runInView (#148337)
In service of flutter/flutter#146879. See flutter/flutter#146879 (comment). I wonder if something is going wrong in the process of subscribing to the isolate event stream in the VM service. This adds a print trace to the `catch` clause of this subscription call.
1 parent 034aa2f commit c7574be

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/flutter_tools/lib/src/vmservice.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,11 @@ class FlutterVmService {
574574
_logger.printTrace('Running $main in view $viewId...');
575575
try {
576576
await service.streamListen(vm_service.EventStreams.kIsolate);
577-
} on vm_service.RPCError {
577+
} on vm_service.RPCError catch (e) {
578+
_logger.printTrace(
579+
'Unable to listen to VM service stream "${vm_service.EventStreams.kIsolate}".\n'
580+
'Error: $e',
581+
);
578582
// Do nothing, since the tool is already subscribed.
579583
}
580584
final Future<void> onRunnable = service.onIsolateEvent.firstWhere((vm_service.Event event) {
@@ -911,11 +915,9 @@ class FlutterVmService {
911915
Duration delay = const Duration(milliseconds: 50),
912916
}) async {
913917
while (true) {
914-
_logger.printTrace('Calling _flutter.listViews...');
915918
final vm_service.Response? response = await callMethodWrapper(
916919
kListViewsMethod,
917920
);
918-
_logger.printTrace('Response from _flutter.listViews: ${json.encode(response?.json)}');
919921
if (response == null) {
920922
// The service may have disappeared mid-request.
921923
// Return an empty list now, and let the shutdown logic elsewhere deal

0 commit comments

Comments
 (0)