You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dart DevTools with MS Edge instead of Chrome #2226
Currently Dart DevTools opens in Google Chrome by default (and by design). My default browser is the new Microsoft Edge that is based on Chromium. Dart DevTools work just fine.
Is it an idea to change this into a setting so we can choose what browser should launch?
This is handled by the DevTools package itself (we just ask it to launch in a browser), so this would need requesting/implementing in the DevTools repo.
That said, there are other Chromium-based browsers that DevTools doesn't not work in (for example Brave, because its ad-blocking/anti-fingerprinting interferes with the canvas rendering - see flutter/devtools#367 (comment)) so I don't know whether it's as simple as just launching in Edge.
Now that we are supporting Flutter web our browser compatibility story is a lot better than when we were using raw HTML. FireFox and Safari should also work fine although there may be a noticeable performance hit.
@jacob314 IIRC - the reason we pushed launching the browser to DevTools was so that it could locate Chrome more easily (there was already Dart code to do it). If we're going to support launching in the users default browser, it might make sense for the editor to just launch it directly rather than extending DevTools to handle this - it's what we already do if DevTools reports an error launching Chrome (or you're running in a cloud IDE), so we could just skip that attempt.
WDYT - shall I add a setting in Dart-Code to select between Chrome (which goes through the DevTools service) and Default Browser (which we just launch) in Dart-Code?
I did the latter - there's now an option dart.devToolsBrowser that accepts chrome or default (defaults to chrome). If you set it to default, it will just open in your system default browser. The default will remain as launching in Chrome (via DevTools service extension) for the reasons mentioned above.
I did the latter - there's now an option dart.devToolsBrowser that accepts chrome or default (defaults to chrome). If you set it to default, it will just open in your system default browser. The default will remain as launching in Chrome (via DevTools service extension) for the reasons mentioned above.
A Dart noob here, how/where do I set that option?
Edit: I didn't look which repo this comment is in lol, but now I think its in my vscode's settings right?
Activity
DanTup commentedon Jan 21, 2020
This is handled by the DevTools package itself (we just ask it to launch in a browser), so this would need requesting/implementing in the DevTools repo.
That said, there are other Chromium-based browsers that DevTools doesn't not work in (for example Brave, because its ad-blocking/anti-fingerprinting interferes with the canvas rendering - see flutter/devtools#367 (comment)) so I don't know whether it's as simple as just launching in Edge.
AlexDotel commentedon Sep 2, 2020
Some solution?
DanTup commentedon Sep 2, 2020
@AlexDotel the comment above is still accurate. Though if you don't have Chrome installed, it should automatically fall back to your default browser.
FWIW, in the next version DevTool will be embedded (see https://dartcode.org/releases/v3-13/#embedded-devtools-improvements) by default.
@jacob314 does DevTools officially support Edge? If so, we could add Edge support to https://github.com/dart-lang/browser_launcher and pass a browser preference to
launchDevTools?jacob314 commentedon Sep 2, 2020
Now that we are supporting Flutter web our browser compatibility story is a lot better than when we were using raw HTML. FireFox and Safari should also work fine although there may be a noticeable performance hit.
DanTup commentedon Sep 7, 2020
@jacob314 IIRC - the reason we pushed launching the browser to DevTools was so that it could locate Chrome more easily (there was already Dart code to do it). If we're going to support launching in the users default browser, it might make sense for the editor to just launch it directly rather than extending DevTools to handle this - it's what we already do if DevTools reports an error launching Chrome (or you're running in a cloud IDE), so we could just skip that attempt.
WDYT - shall I add a setting in Dart-Code to select between Chrome (which goes through the DevTools service) and Default Browser (which we just launch) in Dart-Code?
DanTup commentedon Sep 22, 2020
I did the latter - there's now an option
dart.devToolsBrowserthat acceptschromeordefault(defaults tochrome). If you set it to default, it will just open in your system default browser. The default will remain as launching in Chrome (via DevTools service extension) for the reasons mentioned above.jacob314 commentedon Sep 22, 2020
Sorry I missed this. Having an option to use the default browser now that we support more browsers sounds good.
Nalin-Angrish commentedon Feb 4, 2022
A Dart noob here, how/where do I set that option?
Edit: I didn't look which repo this comment is in lol, but now I think its in my vscode's settings right?
DanTup commentedon Feb 4, 2022
Yep, it's in your VS Code settings. Press
F1, find Preferences: Open Settings (UI) then search fordevtoolsbrowser.