hhstore / blog

My Tech Blog: about Mojo / Rust / Golang / Python / Kotlin / Flutter / VueJS / Blockchain etc.
https://github.com/hhstore/blog/issues
278 stars 22 forks source link

Flutter: DevTools Usage #232

Open hhstore opened 3 years ago

hhstore commented 3 years ago

related:

hhstore commented 3 years ago

flutter devtool 用法:

brief:

ref:

使用方法:

基于 Cli(命令行)启动:

by flutter:

flutter pub global activate devtools


- [x] run tool:  二选一, 启动`本地 web server` 服务来运行开发者工具

by dart:

pub global run devtools

by flutter:

flutter pub global run devtools

Serving DevTools at http://127.0.0.1:9100


> 当前页面效果: 需要输入一个 app 的具体参数, 然后 connect.

![image](https://user-images.githubusercontent.com/3252130/97407702-05baf900-1936-11eb-9c95-ab4c4e542978.png)

- [x] run a app: 启动一个 app 分析. 

cd path/to/flutter/app flutter run



- [x] 打开 chrome 浏览器: 访问 devtool 调试页面. 

### 基于 IDE/编辑器: 

- [x] Android Studio: https://flutter.cn/docs/development/tools/devtools/android-studio
- [x] VS Code: https://flutter.cn/docs/development/tools/devtools/vscode
hhstore commented 3 years ago

使用示例:

项目:

devtools 分析效果:

image

hhstore commented 3 years ago

1

hhstore commented 3 years ago

1

hhstore commented 3 years ago

1