Flutter Attach debugging Flutter Code – Vancouver App Developer
In the actual development process, in order to meet the business aspects of the project and compatible historical code, the Flutter function module is often introduced in aar or Module, etc.; and the Flutter Code is divided into two projects from the Android / iOS Native Code;
What should we do if I need to debug?
Android App Debug – App Developer Vancouver
The most commonly used daily is Run/Debug to track running projects. At present, Flutter Module is a sub-module of Native Project. Direct Run / Debug will run Flutter Module as a new Project ;
At this time, you need to establish a Socket connection between AndroidStudio and the device through the Flutter Attach method, and then you can debug the Flutter Code.
- Flutter Attach runs Flutter Code; Waiting for a connection from Flutter on Redmi K30 5G at this time …
- Run and install Android Native apk ;
- Breakpoint debugging can be performed after synchronized connection with the device, and hot reload is very convenient at this time
iOS App Debug – IOS app Development Vancouver BC
Using Flutter cross-platform technology, it will be much more convenient if you have an understanding of native Android / iOS technology;
There are two main ways: the first is to completely follow the iOS development process, configure the environment, update and run the Native iOS Code, and then Flutter Attach to debug the Flutter Code; the second is to compile a Debug package applicable to the simulator, Install directly on the simulator, and then debug through Flutter Attach ;
- Make sure that Xcode development tools have been installed ;
- Open Xcode-Simulator and install the Debug package provided by iOS students in advance ;
- Flutter Attach runs Flutter Code, which is the same as Android, and breakpoint debugging can be performed after synchronization with the device
installed Xcode after by AndroidStudio open Open iOS Simulator