Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add android, update flag, add info on IPv6
  • Loading branch information
vashworth committed Mar 30, 2023
commit 88d4eb62b01cb26e4da03ccb2c0ea03c3a90d6e7
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 36 additions & 9 deletions src/development/add-to-app/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,49 @@ Select the device on which the Flutter module runs so `flutter attach` filters f

[debugging functionalities]: {{site.url}}/testing/debugging

### Wireless Debugging
### Wireless debugging

#### iOS

You can debug your app wirelessly on an iOS device
using `flutter attach`:

1. Ensure that your device is wirelessly connected to Xcode
as described in the [MacOS installation guide][].
1. Open **Xcode > Product > Scheme > Edit Scheme**
1. Select the **Arguments** tab
1. Add either `--observatory-host=0.0.0.0` for IPv4,
or `--observatory-host=::0` for IPv6 as launch argument
<!-- TO DO: add info on wifi networks -->
<ol markdown="1">
<li markdown="1">

Ensure that your device is wirelessly connected to Xcode
as described in the [iOS setup guide][].

</li>
<li markdown="1">

Open **Xcode > Product > Scheme > Edit Scheme**

</li>
<li markdown="1">

Select the **Arguments** tab

</li>
<li markdown="1">

Add either `--vm-service-host=0.0.0.0` for IPv4,
or `--vm-service-host=::0` for IPv6 as a launch argument

You can determine if you're on an IPv6 network by opening your Mac's
**Settings > Wi-Fi > Details (of the network you're connected to) > TCP/IP**
and check to see if there is an **IPv6 address** section.

![Wireless Port][]{:.mw-100}

</li>
</ol>

#### Android

Ensure that your device is wirelessly connected to Android Studio
as described in the [Android setup guide][].

[MacOS installation guide]: {{site.url}}/get-started/install/macos#deploy-to-ios-devices
[iOS setup guide]: {{site.url}}/get-started/install/macos#deploy-to-ios-devices
[Android setup guide]: {{site.url}}/get-started/install/macos#set-up-your-android-device
[Wireless Port]: {{site.url}}/assets/images/docs/development/add-to-app/debugging/wireless-port.png
3 changes: 3 additions & 0 deletions src/get-started/install/_android-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ you need an Android device running Android 4.1 (API level 16) or higher.
1. Enable **Developer options** and **USB debugging** on your device.
Detailed instructions are available in the
[Android documentation]({{site.android-dev}}/studio/debug/dev-options).
1. [Optional] To leverage wireless debugging, enable **Wireless debugging**
on your device. Detailed instructions are available in the
[Android documentation]({{site.android-dev}}/studio/run/device#wireless).
1. Windows-only: Install the [Google USB
Driver]({{site.android-dev}}/studio/run/win-usb).
1. Using a USB cable, plug your phone into your computer. If prompted on your
Expand Down
6 changes: 3 additions & 3 deletions src/get-started/install/_ios-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ you will also need the third-party CocoaPods dependency manager.
To set up physical device deployment in Xcode,
connect your device to the USB port on your
computer.

</li>
<li markdown="1">
<a name="wireless"></a>
[Optional] To leverage wireless debugging, ensure that
Expand All @@ -108,13 +108,13 @@ you can unplug your device from USB.

Sometimes it takes longer to find network devices.
If you don't see your device listed when using `flutter run`,
try extending the timeout: `flutter run --device-timeout 5`.
try extending the timeout: `flutter run --device-timeout 10`.

For additional help troubleshooting,
check out [Apple's Developer Forums][]. For setting up
wireless debugging with `flutter attach`,
checkout [Debugging your add-to-app module][].

</li>
<li markdown="1">

<a name="trust"></a>
Expand Down