Debugging on Mobile Devices (ok)

https://support.brightcove.com/debugging-mobile-devices

launch Chrome and browse to 
chrome://inspect/#devices

Debugging on Mobile Devices

Product(s) Video CloudRole(s) Player Developer Topic(s)Developer Concepts/Tools Troubleshooting/Error Handling

In this topic, you will learn about debugging JavaScript on mobile devices. During development testing and debugging content on mobile platforms can be very challenging.

Overview

In this document you will learn how to get started with debugging on mobile devices and covers the following solutions:

  • Debugging on iOS devices

  • Debugging on Android devices

  • Using Charles on mobile devices

This document serves as a jumping off point for developers to debug on mobile devices. It does not cover all methods for mobile debugging. For more information on debugging in general, visit the JavaScript Debugging Basics documentation.

iOS debugging

Minimum requirements for iOS debugging

  • Safari version 6+ running on Mac MacOS

  • iPhone or iPad with iOS 6+

Note: if you are on iOS 10.3 or later, open the Settings and navigate to General > About > Certificate Trust Settings, and find the Charles Proxy certificate, and switch it on to enable full trust for it.

Using Safari Remote Debugging

Apple's iOS 6 update introduced Safari Remote Debugging, which allows you debug web pages in the Safari app on iOS devices. To get started, follow the steps below:

  1. Connect your iOS device to your machine via USB cable.

  2. Still on your device, open the Safari app and browse to any web page.

  3. You can also use the Debugger and Console sections to further debug your page by setting breakpoints, logging data, etc.

For more detailed information on how to use Safari Web Inspector, visit the Apple's developer documentation.

Android debugging

Minimum requirements for Android debugging

  • Chrome 32+ running on Mac or Windows

  • Android device with Chrome for Android 32+

Note: The steps in this section were written using a device running Android 4.3.

Enabling debugging on your device

Before you can begin debugging content on your device, you need to enable USB debugging in your device settings.

  1. If you are a running Android 4.2+, you will need to enable your device's Developer options before you can turn on USB debugging. On your device, open the Settings app and select the About phone menu. Locate your device's Build number and tap it seven times.If you are running an older version of Android, you can enable USB debugging by going directly to Settings > Developer options.

Remote debugging using Chrome for Android

Now that USB debugging is enabled on your device, follow these steps to start remote debugging with Chrome:

  1. On your device, open the Chrome app and browse to a web page.

  2. To the left of the Elements tab, you can select the device icon to open DevTool's Screencast feature. This allows you to open a live preview of the content as it appears on your mobile device. For more information on how you can use screencasting to interact with your device, visit Google's documentation.

For more detailed information on how to use Chrome Developer Tools, visit the Google's developer documentation.

Charles for mobile

Charles is a web proxy that can be run on your own computer, allowing you to record data that is sent and received via your web browser. Visit the Charles website for more information on this application.

Minimum requirements for Charles

  • Charles is compatible with Windows, Mac and Linux

  • iOS and/or Android device

Setting up Charles on your machine

Follow the steps below to get Charles running on your machine.

  1. Download and install Charles on your machine.

  2. Select OK to save changes and close the dialog.

  3. Select OK to exit the SSL Proxying Settings dialog.

Setting up Charles on your device

In this section, you will learn how to set up your iOS and/or Android device to work with Charles on your computer.

Setting up your iOS device

Setting up your Android device

These steps will only work on devices running Android 2.3 and up.

  1. On your device, open a browser and navigate to //chls.pro/ssl.

  2. Next, open the Settings > Wi-Fi menu. You will see a list of networks that you have connected to on your device. Select the wireless network that you are currently connected to. Remember, this network must match the network you are connected to on your computer.

  3. This will open a small dialog with three options—Edit, View, or Forget. Select Edit.

  4. Change the Proxy settings field to Manual.

Related content

Last updated