docs

TOP(About this memo)) > 一覧(Flutter) > デバッグ

VSCodeのFlutter環境の構築

Devtools

(こちらを推奨)VSCode上でDevtoolsを利用する

コマンドラインからDevtoolsを利用する

コードとDevtoolsの連携

(参考)VSCode vs コマンドライン+Devtools

様々なdebugフラグやメソッド

flutter test の際の注意点

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test:
The value of a widget debug variable was changed by the test.

DiagnosticableTree.toStringDeep()

main() => runApp(MyWidget());
class MyWidget extends StatelessWidget {
  const MyWidget({super.key});

  @override
  Widget build(BuildContext context) {
    Future.microtask(
        () => debugPrint((context as StatelessElement).toStringDeep()));
    return const Placeholder();
  }
}
// MyWidget
// └Placeholder
//  └LimitedBox(maxWidth: 400.0, maxHeight: 400.0, renderObject: RenderLimitedBox#60f66)
//   └CustomPaint(renderObject: RenderCustomPaint#af45e)

パフォーマンス測定(未読)

アニメーションのデバッグ(未読)