I observe strange behavior when breakpoint is hit in Android Studio in Flutter project.
I have file register_page.dart where my page representing registration is placed. When I put breakpoint somewhere in the file and it is hit, suddenly Android Studio seems to create a copy of that file and it shouts that it finds a lot of errors in that file. Basically whole file becomes red of errors…
I am able to continue executing but never get any information about code under debugger (like variable values etc.)
This is how it looks:
As you can see, strangely I have two files during debugging (despite having only one in source code). When I want to add another breakpoint in debug session, I have to switch to this file on the left (starting with lib) and put the breakpoint there. When this new breakpoint is hit, it moves me to the file on the right, but I am unable to work with it…IDE also shows 12 errors, but when I cancel debugging session, they go away.
Summary of running flutter doctor command:
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.22631.3593], locale en-AS)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Professional 2022 17.10.0)
[√] Android Studio (version 2023.3)
[√] Connected device (5 available)
[√] Network resources
I tried restarting Android Studio, cleaning and building the project again, but nothing actually works.
Any advice how to overcome this would be appreciated!