Archive
This post is archived and may contain outdated information. It has been set to 'noindex' and should stop showing up in search results.
How to Debug and View Console.Log with Cordova/PhoneGap Android App Using Your PC
Oct 26, 2015MobileComments (2)
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.
Comments (2)
Add a Comment
Nick   Feb 17, 2023
Test test test
Charles Bunders   Jun 01, 2016
Helped immensely, thanks!