Remote debugging (Flutter)

General information

Flutter is an open-source framework for building multi-platform applications from a single codebase, where you can select a Device to build and install your Application. Mobitru Connect tool allows starting a connection to a real Device, accessible in the Device Manager and available for performing any allowed operation.

How to start

To use the real Device with the Flutter, follow the steps:

  1. Install the Flutter and all related tools according to your Platform.
    More details can be found here.
  2. Start a remote debug Session using the following instruction.
  3. You can find an example of a flutter Project here.

Build and install an Application

To build and install your Application using the Flutter, follow the steps:

  1. Open the root project directory in the Console or the Terminal
  2. The further flow will depend on what devices you are going to use:
  1. Run the “flutter devices” command and make sure that connected devices are present in the received List of devices:
  2. Start the build and install process by running the “flutter run” command:
  3. Wait for the Application will be assembled and installed on the Device:
  4. Once the installation is complete, the Flutter debug mode will automatically start:
  1. Start the build process by running the “flutter build ios –config-only” command:
  2. Wait for all dependencies will be resolved and an Xcode project will be generated:
  3. Make sure that the Device session is active in Mobitru Connect.
  4. Open the generated Project in the Xcode by executing “open ios/Runner.xcworkspace” command:
  5. The generated Project should be opened in the Xcode and connected devices should be in the list of available Devices:
  6. Update the Project settings for registering the Bundle Id and specifying of the Development Team.
    More details can be found here.
  7. Please keep in mind that the connected device will be added to your Team Profile after performing the below steps.
  8. Select active schema and start installation on the connected device:
  9. The Application statistics and log capturing will be started automatically:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Debug

Debug is limited for the development environment with Xcode 14.3 and later due to a known issue with xcrun tool (more details can be found here).
For Android and environments with Xcode 14.2 and below, follow the steps:

  1. Open the Project in VS code:
  2. Start a debug session using the above Android instructions for build and install.
  3. In the VS code go to  View > Command Palette…
  4. Type “debug” keyword and select “Debug: Attach to Flutter on Device“:
  5. Wait for the VS code to complete attaching to the Device.
  6. Then the App execution will be stopped on added point after performing the appropriate action:
Scroll to Top