Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 221
Jack Hayfield Avatar asked Dec 14 '22 12:12

Jack Hayfield


1 Answers

  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

like image 137
jsertx Avatar answered Dec 21 '22 11:12

jsertx