Dart-code: Dart DevTools with MS Edge instead of Chrome

Created on 21 Jan 2020  路  7Comments  路  Source: Dart-Code/Dart-Code

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?

See also:
https://github.com/Dart-Code/Dart-Code/issues/1681
https://github.com/Dart-Code/Dart-Code/issues/1760

in commands is enhancement

Most helpful comment

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.

All 7 comments

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 https://github.com/flutter/devtools/issues/367#issuecomment-467788428) so I don't know whether it's as simple as just launching in Edge.

Some solution?

@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?

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.

Sorry I missed this. Having an option to use the default browser now that we support more browsers sounds good.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rgb1380 picture rgb1380  路  3Comments

lukepighetti picture lukepighetti  路  4Comments

DanTup picture DanTup  路  4Comments

ifredom picture ifredom  路  3Comments

CaferPoyrazoglu picture CaferPoyrazoglu  路  4Comments