Skip to content

Set enableDebuggingSupport in DWDS based on specified device ID (defa…#165700

Closed
jyameo wants to merge 1 commit into
flutter:masterfrom
jyameo:yj-hotreload-webserver
Closed

Set enableDebuggingSupport in DWDS based on specified device ID (defa…#165700
jyameo wants to merge 1 commit into
flutter:masterfrom
jyameo:yj-hotreload-webserver

Conversation

@jyameo

@jyameo jyameo commented Mar 21, 2025

Copy link
Copy Markdown
Contributor

This change ensures that enableDebuggingSupport in DWDS is set based on the specified device ID, defaulting to Chrome. This complements the changes made in dart-lang/webdev#2601 and ensures that debugging support is correctly configured for different environments.

fixes dart-lang/sdk#60289

@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 21, 2025
@jyameo jyameo requested review from bkonyi, nshahan and srujzs March 21, 2025 20:27
Comment on lines +432 to +434
// Defaults to 'chrome' if deviceManager or specifiedDeviceId is null,
// ensuring the condition is true by default.
enableDebuggingSupport: (globals.deviceManager?.specifiedDeviceId ?? 'chrome') == 'chrome',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC from the linked change (dart-lang/webdev#2601) this will inject the code required to support debugging into the page but that doesn't mean debugging actually works?

Does globals.deviceManager?.specifiedDeviceId evaluate to null when someone runs flutter run -d web-server? It isn't clear to me why we want to default it to be true when we don't know if it will work or not.

Comment thread packages/flutter_tools/lib/src/isolated/devfs_web.dart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web hot reload breaks app when running as Web Server (-d web-server)

2 participants