Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug a cordova plugin for Android

Hi I have created a cordova plugin for Android. But it is not functioning properly.

I want to debug it an IDE.

How can I debug the cordova android plugin file when I launch the application in my mobile?

What are the different and easiest ways to do it?

Thanks in advance.

like image 667
Aniket Avatar asked May 26 '15 17:05

Aniket


1 Answers

Expanding response of laughingpine, i use this method: Debug javascript part with chrome + dev tools + genymotion. You can access it from "inspect devices" and you can debug javascript part. The problem is for debug my own plugins. For this, i build project "cordova build" from console, and import into Android studio the content of platforms\android from project folders. After repair some errors whit gradle, i can run and debug whit android studio + genymotion, to acces the .java files.

captura screen

like image 106
Javier dc Avatar answered Sep 28 '22 23:09

Javier dc