You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing an iOS app and I followed the example to setup everything and it does send logs to firebase console. But when I set isInDebugMode to true, somehow it just doesn't print it to android studio log. Am I doing something wrong?
Future<void> main() async {
bool isInDebugMode = true;
FlutterError.onError = (FlutterErrorDetails details) {
if (isInDebugMode) {
// In development mode simply print to console.
FlutterError.dumpErrorToConsole(details);
} else {
// In production mode report to the application zone to report to
// Crashlytics.
Zone.current.handleUncaughtError(details.exception, details.stack);
}
};
await FlutterCrashlytics().initialize();
runZoned<Future<Null>>(() async {
await Firestore().settings(timestampsInSnapshotsEnabled: true);
runApp(MaterialApp(
builder: (buildContext, child) {
return AppStateProvider.wrap(child);
},
home: SplashPage()));
}, onError: (error, stackTrace) async {
// Whenever an error occurs, call the `reportCrash` function. This will send
// Dart errors to our dev console or Crashlytics depending on the environment.
await FlutterCrashlytics().reportCrash(error, stackTrace, forceCrash: false);
});
}
The text was updated successfully, but these errors were encountered:
FlutterError.dumpErrorToConsole should dump your error on the console, if it doesn't, the issue come from flutter I'll say and not this plugin. Use breakpoint to see if FlutterError.dumpErrorToConsole is called or not
@PandaGeek1024 I had a similar issue in VSCode. Using the IDE's built-in debugger, my onError was never called. Setting it to null (which should've ignored all errors as stated in these docs) had no effect either.
Running through a terminal with flutter run finally hit the correct handlers and sent the error to the console.
I'm developing an iOS app and I followed the example to setup everything and it does send logs to firebase console. But when I set isInDebugMode to true, somehow it just doesn't print it to android studio log. Am I doing something wrong?
The text was updated successfully, but these errors were encountered: