I have been working on Cordova apps for last few months. I am Using push plugin for Cordova apps but its having issues. Now i want to debug java code and havent found any solution for this problem.
Please suggest me the best way to debug java code used in a cordova plugin. Thank you in advance!
In the Java code for your plugin, import the Log class:
import android.util.Log;
Then use the log API methods and a tag indicating the name of your plugin to generate log entries.
Run your application on a device for the best results, connect the device to your machine using a USB cable and run:
adb logcat|grep tag
on the machine that you develop on and which is connected to the Android device. Substitute "tag" for the tag you used in the log API calls for your plugin. You should see your log messages logged to the Terminal / CLI that you started adb from.