For more information, see Using the Dart analyzer.

Logging

Another useful debugging tool is logging.
You set logging up programmatically
then view the output in the DevTools
logging view, or in the console.

Debugging application layers

Flutter was designed with a layered architecture that includes
widget, rendering, and painting layers. For links to more
information and videos, see The Framework architecture on the
GitHub wiki, and the community article, The Layer Cake.

The Flutter widget inspector provides a visual representation
of the widget tree, but if you want a greater level of detail,
or you want a verbose text-based dump of the widget,
layer, or render trees, see
Debug flags: application layers
in the Debugging Flutter apps programmatically page.

Debug mode assertions