Skip to content

Commit b17c272

Browse files
Leigha Jarettvashworthdomesticmousesfshaza2
authored andcommitted
Adding wireless debugging information to the docs (#8456)
We've added support for wireless debugging of iOS devices. This PR adds documentation for setting it up. To do: - [x] Add in information about IPv4 and IPv6 to `flutter attach` page - [ ] Specify the Flutter release where this feature is available - [x] See if there's any information needed for Android wireless debugging _Issues fixed by this PR (if any):_ #8425 ## Presubmit checklist - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/master/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer. --------- Co-authored-by: Victoria Ashworth <[email protected]> Co-authored-by: Brett Morgan <[email protected]> Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
1 parent cc4ef4a commit b17c272

4 files changed

Lines changed: 84 additions & 1 deletion

File tree

54.4 KB
Loading

src/development/add-to-app/debugging.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,52 @@ Select the device on which the Flutter module runs so `flutter attach` filters f
6262

6363

6464
[debugging functionalities]: {{site.url}}/testing/debugging
65+
66+
### Wireless debugging
67+
68+
You can debug your app wirelessly on an iOS or Android device
69+
using `flutter attach`.
70+
71+
72+
#### iOS
73+
74+
On iOS, you must follow the steps below:
75+
76+
<ol markdown="1">
77+
<li markdown="1">
78+
79+
Ensure that your device is wirelessly connected to Xcode
80+
as described in the [iOS setup guide][].
81+
82+
</li>
83+
<li markdown="1">
84+
85+
Open **Xcode > Product > Scheme > Edit Scheme**
86+
87+
</li>
88+
<li markdown="1">
89+
90+
Select the **Arguments** tab
91+
92+
</li>
93+
<li markdown="1">
94+
95+
Add either `--vm-service-host=0.0.0.0` for IPv4,
96+
or `--vm-service-host=::0` for IPv6 as a launch argument
97+
98+
You can determine if you're on an IPv6 network by opening your Mac's
99+
**Settings > Wi-Fi > Details (of the network you're connected to) > TCP/IP**
100+
and check to see if there is an **IPv6 address** section.
101+
102+
<img src="/assets/images/docs/development/add-to-app/debugging/wireless-port.png" alt="Check the box that says 'connect via network' from the devices and simulators page">
103+
104+
</li>
105+
</ol>
106+
107+
#### Android
108+
109+
Ensure that your device is wirelessly connected to Android Studio
110+
as described in the [Android setup guide][].
111+
112+
[iOS setup guide]: {{site.url}}/get-started/install/macos#deploy-to-ios-devices
113+
[Android setup guide]: {{site.url}}/get-started/install/macos#set-up-your-android-device

src/get-started/install/_android-setup.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ you need an Android device running Android 4.1 (API level 16) or higher.
2626
1. Enable **Developer options** and **USB debugging** on your device.
2727
Detailed instructions are available in the
2828
[Android documentation]({{site.android-dev}}/studio/debug/dev-options).
29+
1. [Optional] To leverage wireless debugging, enable **Wireless debugging**
30+
on your device. Detailed instructions are available in the
31+
[Android documentation]({{site.android-dev}}/studio/run/device#wireless).
2932
1. Windows-only: Install the [Google USB
3033
Driver]({{site.android-dev}}/studio/run/win-usb).
3134
1. Using a USB cable, plug your phone into your computer. If prompted on your

src/get-started/install/_ios-setup.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,35 @@ and an Apple Developer account. If your app is using Flutter plugins,
8686
you will also need the third-party CocoaPods dependency manager.
8787
8888
<ol markdown="1">
89-
89+
<li markdown="1">
90+
<a name="connect"></a>
91+
To set up physical device deployment in Xcode,
92+
connect your device to the USB port on your
93+
computer.
94+
</li>
95+
<li markdown="1">
96+
<a name="wireless"></a>
97+
[Optional] To leverage wireless debugging, ensure that
98+
your device is on the same network as your computer
99+
and that the device has a set passcode.
100+
101+
While the device is attached, open **Xcode > Window > Devices and Simulators**.
102+
Select your phone, and check **Connect via Network.**
103+
For more details, check out
104+
[Apple's documentation on pairing a wireless device with Xcode][].
105+
106+
Once the network icon appears next to the device name,
107+
you can unplug your device from USB.
108+
109+
Sometimes it takes longer to find network devices.
110+
If you don't see your device listed when using `flutter run`,
111+
try extending the timeout: `flutter run --device-timeout 10`.
112+
113+
For additional help troubleshooting,
114+
check out [Apple's Developer Forums][]. For setting up
115+
wireless debugging with `flutter attach`,
116+
checkout [Debugging your add-to-app module][].
117+
</li>
90118
<li markdown="1">
91119
92120
<a name="trust"></a>
@@ -186,3 +214,6 @@ or clicking the Run button in Xcode.
186214
[Xcode account add]: {{site.url}}/assets/images/docs/setup/xcode-account.png
187215
[Apple Silicon Mac]: https://support.apple.com/en-us/HT211814
188216
[Developer Mode]: https://developer.apple.com/documentation/xcode/enabling-developer-mode-on-a-device
217+
[Apple's Developer Forums]: {{site.apple-dev}}/forums/
218+
[Debugging your add-to-app module]: {{site.url}}/development/add-to-app/debugging/#wireless-debugging
219+
[Apple's documentation on pairing a wireless device with Xcode]: https://help.apple.com/xcode/mac/9.0/index.html?localePath=en.lproj#/devbc48d1bad

0 commit comments

Comments
 (0)