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:
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
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.
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
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.
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!