Coming soon! See https://github.com/flutter/devtools/issues/5606.
The text below is under construction.
This page describes how to configure memory usage tracking. See other information on memory leaks here.
Dart and Flutter applications can be confugured to automatically trigger memory usage events and, in case of memory overuse, to save memory heap snapshots to hard drive. The snapshots can be later analysed in DevTools.
Use the function trackMemoryUsage
to configure usage events and auto-snapshotting.
See example.
We recommend to have auto-snapshotting off by default, with possibility to enable it via command line arguments in case of reported memory issues.
TODO (polina-c): add link to DevTools help section.
Usage tracking does not work for web platform.
While usage tracking events are available for all modes, auto-snapshotting is on or off depending on the build mode:
See Dart build modes or Flutter build modes.