Skip to content

Add documentation on wireless debugging #8425

@vashworth

Description

@vashworth

What information is missing?

Once wireless debugging makes it to stable, we should add documentation on how to get it set up.

Step 1: Pair Device

iOS

From what I can find, Apple does not have any official documentation about how to do this.

  1. Attach a iOS device to your Mac.
  2. Make sure device is on same wifi as Mac.
  3. Make sure the device has a passcode set.
  4. Open Xcode > Window > Devices and Simulators > Choose your phone, then check Connect via Network
    213819438-1813bbab-1a0f-442c-8b2d-b8d24d68d3cd
  5. Unplug device

Android

https://developer.android.com/studio/run/device#wireless

Step 2: Run flutter on wireless device

  1. flutter run
  2. Attached devices should appear like normal
  3. Wait for wireless devices to load
  4. Select a device

Can also do flutter devices to see listed devices. Can also target a device with -d flag.

To use flutter attach when running in Xcode

If you want to run your app in Xcode and use flutter attach

  1. Open Xcode > Product > Scheme > Edit Scheme
  2. Click the Arguments tab at the top and then add --observatory-host=0.0.0.0 (IPv4) or --observatory-host=::0 (IPv6) as launch argument
    211063102-204c9d41-8dcc-4af8-bbc1-f29592348963
  3. Run project in Xcode
  4. flutter attach and select correct device

Troubleshooting

Connecting to wireless devices can be inconsistent for both iOS and Android.

iOS

  • Check if the device has the network symbol in Xcode > Window > Devices and Simulators
    • If it doesn't, try attaching the device to the computer and going into the device's Settings > Developer > Clear Trusted Computers. It should reprompt you to trust the computer, accept it.
    • If it does, try doing flutter run --device-timeout # flag, replacing # with a number greater than 5, this is the amount of seconds it will use to search for wireless device. Sometimes if you have multiple devices/simulators connected, it can be slow to find the devices.
      • If still no luck, try targeting the device with flutter run -d [device-id], replacing [device-id] with the device's identifier. You can get the device identifier in Xcode > Window > Devices and Simulators and then select the device and right click and select "Copy Identifier"

Android

I haven't figured out routine way to fix issue of Android device disconnecting yet. One thing is sometimes you just have to wait for it to connect, it can be slow

How would you like us to fix this problem?

No response

Metadata

Metadata

Assignees

Labels

cl.fixedIssue is closed as fixedd.enhancementImproves docs with specific askdev.debuggingRelates to debugging Flutter appse1-hoursEffort: < 8 hrsp2-mediumNecessary but not urgent concern. Resolve when possible.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions