Flutter: Unable to run app in debug mode in chrome

Viewed 4944

i wanna run flutter web app on chrome in debug mode but whenever i try so, i get this error

Failed to establish connection with the application instance in Chrome. This can happen if the websocket connection used by the web tooling is unable to correctly establish a connection, for example due to a firewall.

but release mode works properly using

flutter run -d chrome --release

i have tried;

flutter clean.

flutter pub cache repair

switching to master channel

disabling firewalls

But none of these worked. I seriously need to run the app in debug mode for troubleshooting. Thanks in advance

3 Answers

You have to download Dart Debug Extension on Google Chrome to run flutter app on chrome through your editor

None of the above worked for me, too. Then, I disconnected my VPN and started debugging. It worked fine.

This error kept popping up randomly. I would run flutter clean but that only worked for a few runs then the problem came back. I decided to use Edge and so far I haven't seen the problem again.

flutter run -d edge
Related