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:
adb
(not required on recent versions of Chrome) (guide for OSX)adb devices
in your terminal (not required on recent versions of Chrome), and select ok
in the popup on your phone Allow USB debugging?
.chrome://inspect
, or choose More tools => Inspect Devices...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.