Debug on iOS Device

Filter by IDE
Select the Progress AppBuilder client you are currently using for development.

IDE

Debugging on device is an experimental feature. You can debug on device from the classic Windows desktop client, the extension for Visual Studio or the command-line interface.

In the Microsoft Visual Studio 2013 and later, you can debug on device using the AppBuilder debug tools or the built-in Microsoft Visual Studio debugger. For earlier versions of Microsoft Visual Studio, you can debug on device only using the AppBuilder debug tools.

You can debug your app while running it on device. For debugging NativeScript apps, AppBuilder taps into the built-in debugger tool on the device.

Prerequisites

  • Verify that your preferred AppBuilder client is running and you are logged in.
  • Verify that your device and application meet the requirements for debugging on device.
    For more information about the prerequisites for debugging on device, see Requirements for Debugging on Device.

Procedure

In-Browser

Debugging on connected device is an experimental feature and is not applicable to the in-browser client. To debug your applications on a connected device, run the classic Windows desktop client, the extension for Visual Studio or the command-line interface.

Windows

For apps developed with TypeScript, you cannot debug the TypeScript source files. You need to debug the transpiled JavaScript files.

  1. Verify that you have connected your device and the extension for Visual Studio recognizes it.
  2. Verify that you have applied the Debug build configuration.
  3. Verify that you have configured a valid pair of development certificate and provisioning profile.
  4. In the main menu bar in the classic Windows desktop client, select RunBuild and deploy and wait for AppBuilder to install the application on your device.
  5. On your device, run the application.
  6. In the classic Windows desktop client, in the status bar, click Show Mobile Devices.
  7. Select your device and click Debug.
  8. Select your app from the list of debuggable apps found on the device.
  9. Click Attach and start debugging.

Visual Studio

To debug on iOS devices with the AppBuilder debug tools, perform the following steps.

For apps developed with TypeScript, you cannot debug the TypeScript source files. You need to debug the transpiled JavaScript files.

  1. Verify that you have connected your device and the extension for Visual Studio recognizes it.
  2. Verify that you have applied the Debug build configuration.
  3. Verify that you have configured a valid pair of development certificate and provisioning profile.
  4. In the main menu bar in Microsoft Visual Studio, select AppBuilderBuild <app_name> and Deploy and wait for AppBuilder to install the application on your device.
  5. On your device, run the application.
  6. In the main menu bar in Microsoft Visual Studio, select AppBuilderDevices List.
  7. Select your device and click Debug.
  8. Select your app from the list of debuggable apps found on the device.
  9. Click Attach and start debugging.

To debug on iOS devices with the Microsoft Visual Studio debug tools, perform the following steps.

  1. Verify that you have connected your device and the extension for Visual Studio recognizes it.
  2. Verify that you have applied the Debug build configuration.
  3. Verify that you have configured a valid pair of development certificate and provisioning profile.
  4. In the main menu bar in Microsoft Visual Studio, select AppBuilderBuild <app_name> and Deploy and wait for AppBuilder to install the application on your device.
  5. On your device, run the application.
  6. In the code editor, open the file that you want to debug.
    • If you are using JavaScript to develop your app, open the JS file that you want to debug.
    • If you are using TypeScript to develop your app, open the TS file that you want to debug.
      If you do not have the "sourceMap": true or the "inlineSourceMap": true compiler option in your tsconfig.json file, you will not be able to debug your TypeScript sources using the Microsoft Visual Studio built-in debug tools.
  7. In the leftmost margin of the code editor, click next to a line number to set a breakpoint.
    You can set breakpoints this way at any point of the debugging process.
  8. In the Standard toolbar, from the Start Debugging drop-down menu, select your device.
  9. Click Start Debugging.
  10. Debug your app with the built-in debugger.
    For more information, see How Do I... Topics: Debugger.

CLI

In this version of the command-line interface, you cannot debug on device from the command-line interface on macOS systems.

For apps developed with TypeScript, you cannot debug the TypeScript source files. You need to debug the transpiled JavaScript files.

  1. Verify that you have connected your device.
  2. Run the following command to verify that AppBuilder recognizes your connected device.

    appbuilder device
    
  3. Run the following command to deploy your app on the connected device.

    appbuilder deploy ios --provision "My Development Provisioning Profile" --certificate "My Development Certificate"
    
  4. Wait for the build and deployment process to complete.
  5. On your device, run the application.
  6. Run the following command to launch the debug tools.

    appbuilder debug ios
    

    If prompted, unlock your device, confirm that you trust the computer and click OK in AppBuilder.

  7. Select your device.
  8. Select your app from the list of debuggable apps found on the device.
  9. On a Windows system, select the application view that you want to debug and click Debug.
  10. On a macOS system, double-click the application view that you want to debug.
  11. Start debugging your app.

Next Steps

Continue writing your code.

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.