【发布时间】:2018-03-11 10:42:41
【问题描述】:
我刚开始学习 Flutter,并在 Building Layout tutorial 中构建了示例应用程序。
在source code 中建议取消注释两行,以查看可视化调试行,但到目前为止还没有运气。
import 'package:flutter/material.dart';
// Uncomment lines 7 and 10 to view the visual layout at runtime.
//import 'package:flutter/rendering.dart' show debugPaintSizeEnabled;
void main() {
//debugPaintSizeEnabled = true;
runApp(new MyApp());
}
我尝试了什么?
- 热重载
- 完全重启
- 将其他调试变量设置为 true:
debugPaintPointersEnabled =
debugPaintBaselinesEnabled =
debugPaintLayerBordersEnabled =
debugRepaintRainbowEnabled = true;
,我从Docs 读到的。他们工作得很好。
我的设置?
- Visual Studio 代码
- 无 Dart 2 预览模式
- Flutter 测试版
- 我使用的是 Android 移动硬件,而不是虚拟 (Moto G5)
问题:如何让可视化调试器工作?
【问题讨论】:
标签: flutter