Setting breakpoints

Note:
  You can set breakpoints in DevTools’ Debugger, or
  in the built-in debugger of your IDE. If you want to
  set breakpoints programmatically, use the following
  instructions.

You can insert programmatic breakpoints using the
debugger() statement. To use this, you have to
import the dart:developer package at the top of
the relevant file.

The debugger() statement takes an optional when
argument that you can specify to only break when a
certain condition is true, as in the following example:

Debug flags: application layers

Each layer of the Flutter framework provides a function to dump its
current state or events to the console (using debugPrint).

Widget tree