Reland "Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146593)" (#152386)

This reverts commit 7cdc23b3e1.

The failure in the `native_assets_test` integration test on Windows was caused by the DevTools process not being shutdown by the `ColdRunner` when running the profile mode portion of the test. This resulted in the test being unable to clean up the project created by the test as DevTools was still holding onto a handle within the directory. This PR adds back the mistakenly removed DevTools shutdown logic in the `ColdRunner`.
This commit is contained in:
Ben Konyi
2024-07-26 16:51:19 -04:00
committed by GitHub
parent 3a737c9a56
commit 33b402d24c
57 changed files with 790 additions and 752 deletions

View File

@@ -489,7 +489,7 @@ abstract class FlutterCommand extends Command<void> {
defaultsTo: true,
help: 'Enable (or disable, with "--no-$kEnableDevTools") the launching of the '
'Flutter DevTools debugger and profiler. '
'If specified, "--$kDevToolsServerAddress" is ignored.'
'If "--no-$kEnableDevTools" is specified, "--$kDevToolsServerAddress" is ignored.'
);
argParser.addOption(
kDevToolsServerAddress,

View File

@@ -414,6 +414,7 @@ class FlutterCommandRunner extends CommandRunner<void> {
throwToolExit('The "--machine" flag is only valid with the "--version" flag or the "analyze --suggestions" command.', exitCode: 2);
}
// TODO(bkonyi): can this be removed and passed solely via DebuggingOptions?
final bool shouldPrintDtdUri = topLevelResults[FlutterGlobalOptions.kPrintDtd] as bool? ?? false;
DevtoolsLauncher.instance!.printDtdUri = shouldPrintDtdUri;