How to start debugging iOS apps remotely

Olga Weis
Remote debug iOS

Contents

  1. What is remote debugging?
  2. iOS remote debugging tool.
  3. How to debug iOS app wirelessly.

1. What is remote debugging?


Debugging is the process of detecting and removing computer program bugs. To correct errors, software developers use debugging tools.

Remote debugging means that you use your local debugging tool to correct the defective code running on a remote machine.

To debug an application remotely, programmers use special tools that support the remote debugging feature. They start the debugger on the local computer and launch the program in debug mode on a remote machine. Then, connect the debugger to the remote computer via a communication port. Once connected, the debugger is able to control the execution of the program on the remote system and retrieve information about its state.

When it comes to testing and debugging of mobile applications, the important element is target devices. Well, if you have the possibility to connect a phone, tablet, 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? Remote debugging will probably be the best option in that case.

2. iOS remote debugging tool


If you are wondering how to debug iOS app on a device, we’ll tell you about the simplest way. Wireless debugging has become a reality thanks to the new feature available in Xcode 9.

This feature eliminates the need to always connect and disconnect the device for app installation and debugging.

However, you should bear in mind that, despite its many advantages, this method has some major flaws:

  • For remote debugging of your iOS device, you’ll still need to physically attach the device to your Mac at least once.
  • Mac system and iPhone/iPad should share the same network. If the iOS device and Mac are not connected to the same LAN, or iPhone/iPad is located miles away from the programmer’s computer, the remote iOS debug feature becomes unavailable.

FlexiHub

Windows, macOS, Linux, Android
4.8 Rank based on 78+ users

The efficient solution that may help you overcome the challenges of Xcode remote debugging is FlexiHub, a dedicated software for sharing USB over any distance.

FlexiHub

FlexiHub is designed to virtualize USB devices, (like iPhone, iPad, iPod, etc.) and redirect them over the network. The solution works across LAN, Ethernet, and the Internet.

Here’s how FlexiHub can help you access and debug iOS app on devices remotely:

  1. To establish a remote connection to your iOS device, you’ll need to install Flexihub 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 PC, you’ll see iPhone/iPad available for connection. Click “Connect”.

That’s it. Now you can access the remote iOS device from your local computer as though it were directly connected to your machine.

If you still want to go with the wireless debugging presented in Xcode 9, below you will find a brief step-by-step guide.

How to debug iOS app wirelessly


Before you start, make sure that you use Xcode 9.0 or later, macOS 10.12.4 or later, and iOS 11.0 or later.

To set up iPhone, iPad, or iPod touch, follow these steps:

  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”. Xcode remote debugging

    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.

  6. Disconnect your device.

Now you are ready to start remote debug of iOS apps.