skip to Main Content

I’m trying to debug an issue which is only happening when running my app on a device, in release mode, and pointed to a specific cloud environment. I see guidance online suggesting we use the flutter logs command and print statements to see the logs.

I also found a post suggesting we can use the logger package and pass in a custom filter like so:

class DebugLogFilterOverride extends LogFilter {
  @override
  bool shouldLog(LogEvent event) {
    return true;
  }
}

Unfortunately, none of these options are working for me. Is there an alternative way to see logs and/or debug a Flutter app running in release mode or am I getting something wrong here?

2

Answers


  1. It may not work, because it’s not compatible with Flutter.
    https://github.com/simc/logger Original Package
    https://github.com/Bungeefan/logger Read the bottom most section.(New Repo)
    https://github.com/Bungeefan/logger/issues/25 Read Details.

    Thanks 🙂

    Login or Signup to reply.
  2. Run the following command:

    flutter run --release -v
    

    Please note that when running your app in release mode, some debugging features and information may be limited or disabled. If you need to log messages or debug your app in release mode, consider using a logging package like flutter_logs

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search