Set enableDebuggingSupport in DWDS based on specified device ID (defa…#165700
Set enableDebuggingSupport in DWDS based on specified device ID (defa…#165700jyameo wants to merge 1 commit into
Conversation
|
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. |
| // Defaults to 'chrome' if deviceManager or specifiedDeviceId is null, | ||
| // ensuring the condition is true by default. | ||
| enableDebuggingSupport: (globals.deviceManager?.specifiedDeviceId ?? 'chrome') == 'chrome', |
There was a problem hiding this comment.
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.
This change ensures that
enableDebuggingSupportin 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