Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dart DevTools with MS Edge instead of Chrome #2226

Closed
brouwer opened this issue Jan 21, 2020 · 9 comments
Closed

Dart DevTools with MS Edge instead of Chrome #2226

brouwer opened this issue Jan 21, 2020 · 9 comments
Labels
in commands Relates to commands (usually invoked from the command Palette) is enhancement
Milestone

Comments

@brouwer
Copy link

brouwer commented Jan 21, 2020

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:
#1681
#1760

@DanTup
Copy link
Member

DanTup commented 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.

@DanTup DanTup added the upstream in dart / flutter Needs changing in Dart or Flutter label Jan 21, 2020
@AlexDotel
Copy link

Some solution?

@DanTup
Copy link
Member

DanTup commented 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
Copy link

jacob314 commented 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
Copy link
Member

DanTup commented 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 DanTup added this to the v3.15.0 milestone Sep 7, 2020
@DanTup DanTup added in commands Relates to commands (usually invoked from the command Palette) is enhancement and removed upstream in dart / flutter Needs changing in Dart or Flutter labels Sep 7, 2020
@DanTup DanTup closed this as completed in 447d53f Sep 22, 2020
@DanTup
Copy link
Member

DanTup commented Sep 22, 2020

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.

@jacob314
Copy link

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

@Nalin-Angrish
Copy link

Nalin-Angrish commented Feb 4, 2022

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?

@DanTup
Copy link
Member

DanTup commented Feb 4, 2022

Yep, it's in your VS Code settings. Press F1, find Preferences: Open Settings (UI) then search for devtoolsbrowser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in commands Relates to commands (usually invoked from the command Palette) is enhancement
Projects
None yet
Development

No branches or pull requests

5 participants