Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter: DevTools Usage #232

Open
2 tasks done
hhstore opened this issue Oct 20, 2020 · 5 comments
Open
2 tasks done

Flutter: DevTools Usage #232

hhstore opened this issue Oct 20, 2020 · 5 comments

Comments

@hhstore
Copy link
Owner

hhstore commented Oct 20, 2020

related:

@hhstore
Copy link
Owner Author

hhstore commented Oct 20, 2020

flutter devtool 用法:

brief:

ref:

使用方法:

  • 命令行启动方式, 要掌握.
  • IDE 也是 ok 的. 后面会给一个示例.

基于 Cli(命令行)启动:

# by dart:
pub global activate devtools

# by flutter:
flutter pub global activate devtools

  • 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

  • run a app: 启动一个 app 分析.
cd path/to/flutter/app
flutter run

  • 打开 chrome 浏览器: 访问 devtool 调试页面.

基于 IDE/编辑器:

@hhstore
Copy link
Owner Author

hhstore commented Oct 20, 2020

使用示例:

项目:

devtools 分析效果:

  • 启动Android模拟器+devtools+浏览器分析页面.
  • 开启Debug Paint, 页面网格分析布局细节.

image

@hhstore
Copy link
Owner Author

hhstore commented Oct 20, 2020

1

2 similar comments
@hhstore
Copy link
Owner Author

hhstore commented Oct 20, 2020

1

@hhstore
Copy link
Owner Author

hhstore commented Oct 20, 2020

1

@hhstore hhstore changed the title Flutter: DevTool Usage Flutter: DevTools Usage Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant