android studio debug设置,在Android Studio中使用Flutter进行调试时如何“设置值...”

问题

使用“New Flutter Project”创建Flutter App时,以下图像和代码是默认设置 .

87c73929cfb5d37bf7e808c2cde90c19.png

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.

);

}

}

我试图通过在使用此代码进行调试时在_counter递增的代码中设置一个断点来“设置值...”,但即使我将鼠标悬停在光标上也无法按下 .

4af9a96a6456403dfcc57658897a76bf.png

①"Debug 'main.dart' (^D)"②断点③"Set Value..."

问题

如何在Android Studio中使用Flutter进行调试时"Set Value..." .

开发环境

Android Studio 3.1.4

颤振0.5.1

飞镖2

为x86构建的Android SDK

最好的祝福,

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值