iOS remote debugging - a how-to guide
Tags: iosdebug, debugiosapp, remotedebugios, debugiosappondevice
Published: 2018-06-06 12:06:03

---
title: iOS remote debugging - a how-to guide
published: true
description: find out how to enable iOS remote debugging in Xcode and debug apps on remote iOS devices.
tags: ios debug, debug ios app, remote debug ios, debug ios app on device
---

# iOS remote debugging - a how-to guide

When it comes to testing and debugging of iOS applications, the emulator cannot fully replace testing them on actual devices. Well, if you have the possibility to connect iPhone, iPad, etc. directly to your development machine, you don’t have to worry. But what if you needed to inspect an app running on a device which couldn’t be physically connected to your Mac?

## Wireless debugging

Apple has added an option for wireless debugging in Xcode 9. But before you start, you should bear in mind **several conditions**:

* Mac computer and iOS device should share the same network.

* You should use Xcode 9.0 or later, macOS 10.12.4 or later, and iOS 11.0 or later.

Okay, now lets proceed to the actual steps that will help you enable a remote debugging:

1. Open your project on Xcode.
2. Select Window > Devices and Simulators.
3. In the window that appears, click “Devices”.
4. Link your device to your Mac via a USB cable.
5. In the left column, choose the device, and in the detail area, check the box “Connect via network”.

![iOS remote debugging](https://www.flexihub.com/images/upload/flexihub/articles/ios/xcode_remote_debugging.png "Wireless debugging Xcode")

Now, Xcode will pair with your device. If Xcode can connect with the device over the network, a network icon will appear next to the device in the left column and you can safely disconnect your device.

## How to debug iOS apps on remote devices

If the first condition is not met and the device does not share the same network as Mac or even located miles away from the machine, remote debug with the help of Xcode will not be possible.

However, there is a workaround! You will still be able to debug such device with the help of USB over Ethernet redirection software, e.g. [FlexiHub](https://www.flexihub.com/). It is designed to virtualize USB devices, (like iPhone, iPad, iPod, etc.) and redirect them over the network. The software works across LAN, Ethernet, and the Internet.

1. To establish a remote connection to the iOS device, [download and install Flexihub](https://www.flexihub.com/download.html) on both the local machine running the debugger and a remote computer with the iOS device physically attached.
2. Launch FlexiHub on the local machine and register an account - click ‘Sign up’ link and follow the instructions. Sign into the account.
3. Start the software on the remote computer and log into FlexiHub account using the same credentials.
4. In the software interface on the local Mac, you’ll see iPhone/iPad available for connection. Click “Connect”.

![debug iOS app on device](https://www.flexihub.com/images/articles-landing/fh.jpg "FlexiHub")

That’s it. Now you can access the remote iOS device from your local computer and start the debugging process as though the device was directly connected to your machine.