DevOps: Wireless Debugging for iOS and tvOS

As if you needed another reason to keep Visual Studio for Mac up to date, the latest version released a week ago today (Release Notes) bears an intriguing line item:

Screen Shot 2018-03-12 at 6.12.18 PM

If you’ve been playing around in the beta channel, or are familiar with developing in XCode, this comes as no surprise. In fact, wireless debugging in XCode has been arounds since XCode 9.0, but I was excited to have the chance to play around with the feature in my day-to-day work. If, like me, you’re new to Wireless Debugging, this post is for you! Let’s take a crash course in setting up and wirelessly deploying to an iOS device.

Configuring a Device for Wireless Deployment Using XCode

There’s currently no way to set up a wireless device directly in Visual Studio Mac, so you’ll need to pop open XCode and grab a handy USB-C Cable. Plug in your iPhone and hit ⇧⌘2 to open the Devices and Simulators menu. From the devices tab, locate your connected phone and select the checkbox for Connect via Network

Screen Shot 2018-03-12 at 6.23.09 PM

Once selected, your Mac will attempt to connect over the network. Once a connection is successfully established, a symbol will appear next to the device name to indicate it is network enabled.

Screen Shot 2018-03-12 at 6.23.32 PM

At this point, you can disconnect your phone and close XCode. You can find the complete setup documentation for a variety of devices, including tvOS hardware, here

Connecting to a Wireless Device

Now, we can launch Visual Studio for the Mac and deploy to our wirelessly connected device. If you hadn’t already already, now is a good time to “Check for Updates” to make sure you’re running v7.1 or better. Assuming everything is running smoothly, your wirelessly connected device will appear in the dropdown list in the section below Simulators

Mar-12-2018 18-35-59

All that’s left is to start debugging. I’ve noticed deployments take slightly longer (understandable, given the inherit latency in wireless), so if you’re distracted for long enough that your device locks it’s screen, you’ll be prompted to correct before proceeding.

Mar-12-2018 18-41-28

And we’re off! We can now remotely debug and test our applications, all without a cable! Not using a max as your primary developer device? Have no fear – wireless debugging is available for Visual Studio on Windows too!




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s