diff --git a/packages/flutter_tools/test/integration.shard/debug_adapter/test_client.dart b/packages/flutter_tools/test/integration.shard/debug_adapter/test_client.dart index 04776a23e6f..fbd6cf8c199 100644 --- a/packages/flutter_tools/test/integration.shard/debug_adapter/test_client.dart +++ b/packages/flutter_tools/test/integration.shard/debug_adapter/test_client.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// TODO(bkonyi): remove and cleanup prints once https://github.com/flutter/flutter/issues/172636 +// is resolved. +// ignore_for_file: avoid_print + import 'dart:async'; import 'package:dds/dap.dart'; @@ -129,6 +133,7 @@ class DapTestClient { bool? supportsRunInTerminalRequest, bool? supportsProgressReporting, }) async { + print('DapTestClient.initialize: wait for responses'); final List responses = await Future.wait(>[ event('initialized'), sendRequest( @@ -140,6 +145,7 @@ class DapTestClient { ), sendRequest(SetExceptionBreakpointsArguments(filters: [exceptionPauseMode])), ]); + print('DapTestClient.initialize: got responses, sending config done'); await sendRequest(ConfigurationDoneArguments()); return responses[1] as Response; // Return the initialize response. } @@ -261,8 +267,12 @@ class DapTestClient { Future Function()? launch, }) { return Future.wait(>[ - initialize(exceptionPauseMode: exceptionPauseMode), - launch?.call() ?? this.launch(program: program, cwd: cwd), + initialize( + exceptionPauseMode: exceptionPauseMode, + ).then((_) => print('DapTestClient.initialize: completed')), + (launch?.call() ?? this.launch(program: program, cwd: cwd)).then( + (_) => print('DapTestClient.launch: completed'), + ), ], eagerError: true); } @@ -398,11 +408,20 @@ extension DapTestClientExtension on DapTestClient { final Future>> testNotificationEventsFuture = testNotificationEvents .toList(); + print('DapTestClient.start: started'); if (start != null) { await start(); } else { await this.start(program: program, cwd: cwd, launch: launch); } + print('DapTestClient.start: completed'); + + unawaited(outputEventsFuture.then((_) => print('DapTestClient.outputEventsFuture: completed'))); + unawaited( + testNotificationEventsFuture.then( + (_) => print('DapTestClient.testNotificationEventsFuture: completed'), + ), + ); return TestEvents( output: await outputEventsFuture, diff --git a/packages/flutter_tools/test/integration.shard/debug_adapter/test_support.dart b/packages/flutter_tools/test/integration.shard/debug_adapter/test_support.dart index d0d4f9e2e1a..52039ff4c86 100644 --- a/packages/flutter_tools/test/integration.shard/debug_adapter/test_support.dart +++ b/packages/flutter_tools/test/integration.shard/debug_adapter/test_support.dart @@ -29,7 +29,11 @@ final useInProcessDap = Platform.environment['DAP_TEST_INTERNAL'] == 'true'; /// This is useful for debugging locally or on the bots and will include both /// DAP traffic (between the test DAP client and the DAP server) and the VM /// Service traffic (wrapped in a custom 'dart.log' event). -final verboseLogging = Platform.environment['DAP_TEST_VERBOSE'] == 'true'; +final bool verboseLogging = + Platform.environment['DAP_TEST_VERBOSE'] == 'true' || + // Enable verbose logging on CI bots. + // TODO(bkonyi): remove this once https://github.com/flutter/flutter/issues/172636 is resolved. + Platform.environment.containsKey('SWARMING_TASK_ID'); const endOfErrorOutputMarker = '════════════════════════════════════════════════════════════════════════════════';