Debugging Flutter apps programmatically

Logging

Setting breakpoints

Debug flags: application layers

Widget tree
Render tree
Layer tree
Semantics tree
Scheduling

Debug flags: layout

Debugging animations

Debug flags: performance

Tracing Dart code performance

Performance overlay

Widget alignment grid

This doc describes debugging features that you can enable in code.
For a full list of debugging and profiling tools, see the
Debugging page.

Note:
  If you are looking for a way to use GDB to remotely debug the
  Flutter engine running within an Android app process,
  check out flutter_gdb.

Logging

Note:
  You can view logs in DevTools’ Logging view
  or in your system console. This sections
  shows how to set up your logging statements.