I have a problem that suddenly the Flutter web debugger doesn't stop at the breakpoints I set. For example, I have set a breakpoint in the main.dart at the initializeApp() line and the debugger is not stopping here instead it randomly opens stops at the main of the file 'web_entrypoint.dart' which is not created by myself.
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
configureInjection(Environment.prod);
await Firebase.initializeApp();
final firebaseFirebaseRemoteConfigManager =
FirebaseRemoteConfigManager(instance: remoteConfig);
firebaseFirebaseRemoteConfigManager.setupDefaults();
await remoteConfig.fetchAndActivate();
runApp(MyApp());
}
When I set a breakpoint in a build method of any widget it also doesn't stop at the line of code it stops, for example in the 'scheduleFrame' method of the 'binding.dart' file.
I already have tried to check out earlier commits where the debugger 100% worked, but I still have the problem there, so I assume that it has to do something with my setup. Did anyone else had a similar problem?
Here is my flutter doctor output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.4, on macOS 11.6 20G165 darwin-x64, locale de)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more
details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.65.2)
The flutter team has posted a temporary fix till the fix will be merged into stable: link
It worked for me and now I can debug web again.