When we use flutter run to debug the App, if the data line is in poor contact or disconnected, we may need to execute flutter run
again when we want to continue debugging.
But in fact, there is another command called flutter attach. It can achieve the following functions
- attach to a running app
- Support specifying device id for attach
- Support specified port for attach
- Support setting timeout
- Supports passing key-value key-value pair settings
It is also very simple to use
1
|
|
When multiple devices are available
First use flutter devices
to view the target device id
1 2 3 4 5 |
|
Then execute the device id to execute.
1
|
|
This article is reprinted from https://droidyue.com/blog/2022/07/31/flutter-attach-process/
This site is for inclusion only, and the copyright belongs to the original author.