Any way to launch this with chromium instead of google chrome? I works in chromium but right now if I want to open it I have to Launch it from vs-code get a ProcessException in vs code and then copy the command into my terminal (and wrap the URL in "s) where I have google-chrome aliased to chromium.
Is there any way to alias this for vs-code? or to modify the command to use chromium instead of chrome?
I use mainly Firefox, prefer chromium over chrome on my machine and don't really want to have three browsers installed if I can avoid it
You could try setting the CHROME_EXECUTABLE environment variable to the location of the Chromium executable. I don't know if it'll work, but DevTools is doing the spawning of the browser by using the browser_launcher package and it seems to check this first:
I tried adding that environment variable in both my terminals (bash as well as fish). I also tried replacing google-chrome with chromium in any configuration files related to flutter. Neither of these have worked. Any other ideas by chance?
I suppose it might work if I were to rebuild the browser_launcher package with chomium instead of google chrome however I am not aware of if I would be able to do that.
Worst case scenario I download chrome or launch devtools by copying the command into a shell. Or I avoid using devtools all together, I usually only use it to hide the debug banner anyway.
It's possible if you set it in your terminal but VS Code wasn't launched from there, that it won't have got the variable.
Easiest way to test, is confirm it's set in your terminal, then run pub global run webdev daemon (in your project folder) and see if that changes anything.
If not, you get to some debugging ;-) I would try:
Open example/main.dart and delete everything after print('launched Chrome'); (we only need one attempt to launch while debugging!)
If running that works, then something else is up. If it fails with the same error, then in lib/src/chrome.dart put print(_executable) right before the Process.start call and see whether it got the exe you'd expect.
1
u/Levelx100 May 23 '19
Any way to launch this with chromium instead of google chrome? I works in chromium but right now if I want to open it I have to Launch it from vs-code get a ProcessException in vs code and then copy the command into my terminal (and wrap the URL in "s) where I have google-chrome aliased to chromium.
Is there any way to alias this for vs-code? or to modify the command to use chromium instead of chrome?
I use mainly Firefox, prefer chromium over chrome on my machine and don't really want to have three browsers installed if I can avoid it