forked from firka/flutter
Set injectDebuggingSupportCode in DWDS based on specified device ID (#165820)
This change ensures that `injectDebuggingSupportCode` in DWDS is set based on the specified device ID, defaulting to Chrome. This complements the changes made in https://github.com/dart-lang/webdev/pull/2601 and ensures that debugging support is correctly configured for different environments. fixes https://github.com/dart-lang/sdk/issues/60289
This commit is contained in:
@@ -49,6 +49,7 @@ typedef DwdsLauncher =
|
||||
required Stream<BuildResult> buildResults,
|
||||
required ConnectionProvider chromeConnection,
|
||||
required ToolConfiguration toolConfiguration,
|
||||
bool injectDebuggingSupportCode,
|
||||
});
|
||||
|
||||
// A minimal index for projects that do not yet support web. A meta tag is used
|
||||
@@ -428,6 +429,10 @@ class WebAssetServer implements AssetReader {
|
||||
),
|
||||
appMetadata: AppMetadata(hostname: hostname),
|
||||
),
|
||||
// Defaults to 'chrome' if deviceManager or specifiedDeviceId is null,
|
||||
// ensuring the condition is true by default.
|
||||
injectDebuggingSupportCode:
|
||||
(globals.deviceManager?.specifiedDeviceId ?? 'chrome') == 'chrome',
|
||||
);
|
||||
shelf.Pipeline pipeline = const shelf.Pipeline();
|
||||
if (enableDwds) {
|
||||
|
||||
Reference in New Issue
Block a user