android studio debug设置,在Android Studio中使用Flutter进行调试时如何“设置值...”
問題
使用“New Flutter Project”創(chuàng)建Flutter App時,以下圖像和代碼是默認設置 .
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++; //
});
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Center(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
new Text(
'You have pushed the button this many times:',
),
new Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
),
],
),
),
floatingActionButton: new FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: new Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
我試圖通過在使用此代碼進行調(diào)試時在_counter遞增的代碼中設置一個斷點來“設置值...”,但即使我將鼠標懸停在光標上也無法按下 .
①"Debug 'main.dart' (^D)"②斷點③"Set Value..."
問題
如何在Android Studio中使用Flutter進行調(diào)試時"Set Value..." .
開發(fā)環(huán)境
Android Studio 3.1.4
顫振0.5.1
飛鏢2
為x86構建的Android SDK
最好的祝福,
總結
以上是生活随笔為你收集整理的android studio debug设置,在Android Studio中使用Flutter进行调试时如何“设置值...”的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android nuwa2,androi
- 下一篇: html制作百度首页的图片不显示,htm