0

I'm developing a Flutter application on Windows, and everything works perfectly in debug mode. However, when I switch to release mode, I encounter multiple issues, particularly with the UI rendering in specific contexts.

The codebase is quite complex, and I'd like to set breakpoints in release mode to better understand and resolve these errors. Unfortunately, Flutter doesn't seem to provide an easy way to debug the release build by default. I attempted modifying the CMakeLists.txt file to enable debug symbols, but it didn't work as expected.

Could someone guide me on how to enable debugging (including breakpoints) for a Flutter release build on Windows? Any tips on how to troubleshoot and fix these issues in release mode would be greatly appreciated.

1 Answer 1

-1

There are few things you can consider

  1. Adding any crash reporting / management tool like Crashlytics or Sentry. You can configure the alerts as well
  2. Add log option in the app and and option to export the logs.

In android and ios, usually will add dev logs (using log('Message to display'); ) and will listen to them using flutter logs command in cmd / terminal

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, but I have no crash... yes I can use logs, but it is very painfull and time consuming. For example, in C++ or in .NET you can compile the release version and generate the debug info. It is not perfect but it help yo debug the release behavior differences. I'm looking for something like this, for example, I should be able to modify the cmakelists.txt to 'optimize' the debug version... but I do not know how. it should be possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.