Jack Hayfield
Jack Hayfield

Reputation: 217

Debugging crash in Cordova App

I am currently developing a cordova / AngularJS based cross platform app with some third party plugins (mainly Bluetooth) and am looking for a way to debug the native Java code of the app or log crash information.

App is running on KitKat 4.4.4 / Samsung Galaxy S4 via cordova run android --debug command

IDE is currently NetBeans with Cygwin console

The javascript console provides no information as to the crash but is clearly tied to the Bluetooth plugin i am using https://github.com/bcsphere/bluetooth

I have tried using adb logcat command but it seems to just continually print out data for an extended period of time without providing anything particularly useful.

Have a basic grasp of Java so would be interested in finding the Java error causing the crash if possible. Any help would be greatly appreciated, thanks.

Upvotes: 4

Views: 4792

Answers (1)

jsertx
jsertx

Reputation: 636

  1. Enable developer mode in android settings
  2. Enable debug by usb
  3. Plug your device to the computer by usb
  4. Run in the terminal: adb logcat
  5. Run the application in your phone, adb logcat will give you the java crash report

To see what you want do this:

adb logcat | grep -i "nameofyourapp"

It will filter the lines of the log

Upvotes: 12

Related Questions