Cordova Debugging the application Debug on Android Device using USB


Example

A Cordova application runs as a website on a WebView component within the native mobile platform. Debugging a cordova application can therefore be done by utilizing your favourite browsers development tools. The following steps are needed to hook the application, running on the device, to the Chrome browser on a development machine:

  1. Enable USB Debugging on your Device (you can follow this guide)
  2. Install the Android Debug Bridge adb (not required on recent versions of Chrome) (guide for OSX)
  3. Connect your phone and execute adb devices in your terminal (not required on recent versions of Chrome), and select ok in the popup on your phone Allow USB debugging?.
  4. Open Chrome
  5. Browse to chrome://inspect, or choose More tools => Inspect Devices...
  6. Select your device and debug using Chrome's developer tools

Depending on your device you may need to download USB drivers first.

You also need to enable 'unknown sources' under Security in Settings if you want to load the app on to your phone.