H3XED

How to Debug and View Console.Log with Cordova/PhoneGap Android App Using Your PC

Oct 26, 2015   Mobile   Nick Vogt   Comments (1)
Please note that this post is over a year old and may contain outdated information.
Debugging can be difficult when using Cordova or PhoneGap to build native Android apps using web technologies (HTML, JavaScript, CSS). Unlike in your desktop browser, you don't have easy access to a convenient Developer Tools window (F12) to show you error logs and the console log.

The easiest solution I found is to use adb (Android Debug Bridge) on your PC to access your Android's logcat. You must have your Android plugged into your PC with USB debugging on. Once connected, run adb logcat in a terminal/console/shell and you'll be presented with a large log that will get updated as your device runs. You'll see JavaScript exceptions, errors, and calls to console.log in there.

Where to Get ADB


If you don't have ADB yet, please refer to this forum post over at XDA-Developers for more information.
Share This Post
Twitter

Comments (1)

Charles Bunders   Jun 01, 2016
Helped immensely, thanks!
Share This Post
Twitter
H3XED © Nick Vogt   RSS   Policies   Twitter