From 1a078f8091ff4aecc7a6d111dae9b45947799f29 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth <15619084+vashworth@users.noreply.github.com> Date: Thu, 13 Jul 2023 12:55:48 -0500 Subject: [PATCH] Add logs to debug VM Service Publication (flutter/engine#43616) Adding logs to help debug why VM Service is being published when it shouldn't (https://github.com/flutter/flutter/issues/129987 and https://github.com/flutter/flutter/issues/129836). [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../ios/framework/Source/FlutterDartVMServicePublisher.mm | 2 ++ .../shell/platform/darwin/ios/framework/Source/FlutterEngine.mm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm index c8083366af..e59bed6c0c 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm @@ -80,6 +80,8 @@ } - (void)publishServiceProtocolPort:(NSURL*)url { + // TODO(vashworth): Remove once done debugging https://github.com/flutter/flutter/issues/129836 + FML_LOG(INFO) << "Publish Service Protocol Port"; DNSServiceFlags flags = kDNSServiceFlagsDefault; #if TARGET_IPHONE_SIMULATOR // Simulator needs to use local loopback explicitly to work. diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm index 1130dcccf7..8f67ec1b8b 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -871,6 +871,8 @@ static void SetEntryPoint(flutter::Settings* settings, NSString* entrypoint, NSS FML_LOG(ERROR) << "Could not start a shell FlutterEngine with entrypoint: " << entrypoint.UTF8String; } else { + // TODO(vashworth): Remove once done debugging https://github.com/flutter/flutter/issues/129836 + FML_LOG(INFO) << "Enabled VM Service Publication: " << settings.enable_vm_service_publication; [self setupShell:std::move(shell) withVMServicePublication:settings.enable_vm_service_publication]; if ([FlutterEngine isProfilerEnabled]) {