Reputation: 914
If I press Ctrl+Enter
, Shift+F9
or Shift+F10
, or go to Run > Run 'main.dart'
or Run > Debug 'main.dart'
, Android Studio tries to run or debug my app on my android device, if connected, or else reports 'No connected devices...'. Debug behaves as expected, stopping at breakpoints.
('No connected devices' is already strange, as flutter devices
returns that both android and Chrome devices are connected and flutter doctor
returns no issues. Flutter web is enabled.)
If I go to terminal in Android Studio, I can execute flutter run -d chrome
, and the app runs in 'debug mode' on Chrome. This debug mode, however, does not stop at breakpoints or behave in any obviously different way to if the app were simply run.
How can I run flutter apps on Chrome and have Android Studio stop at breakpoints?
Upvotes: 1
Views: 2359
Reputation: 10511
To ensure that Android Studio is able to see the Chrome to run the project as a web app, you can select the Chrome from the list of devices dropdown - highlighted in a rectangle in the picture. You can also run the app in debug mode by clicking on the shortcut button from the toolbar - highlighted in circle.
I'm currently running Flutter plugin version 71.2.3 and the breakpoints works as expected. Dart plugin is on version 213.7433
Upvotes: 1