Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Flutter Web on mobile chrome from IDE

My goal is to have "chrome on android" as a selectable run/debug configuration in Intellij.

I am looking for a way to run my flutter web app on my android phones browser. I believe this could be achieved with a custom run configuration in Intellij using a combination of adb and the chrome devtools remote connection.

Clarification: This should be handsfree, all answers have in common, that I have to manually open the url, but I'm looking for a way to "launch" the url on the phone, just like we can launch a web app in chrome for desktop.

I am aware that it its possible, to get the webapp running on the attached device - what I am looking for is a run configuration to automate the steps of starting the webserver, copying the url pushing it to the device and then opening the url there

like image 774
Damian K. Bast Avatar asked Sep 12 '25 16:09

Damian K. Bast


1 Answers

If you want debug only, you may use

flutter run -d web-server --web-port 8080 --web-hostname 0.0.0.0

then access http://>your-ip>:8080

** also you should ensure that your port(8080) is open.

like image 76
Mrinal Jain Avatar answered Sep 15 '25 06:09

Mrinal Jain