I inherited a Phonegap application with a few extra Java files in them (for extending the UI).
Is there a tool I can use to debug the phonegap application in the desktop browser, despite the fact that the application has the Java plug-ins which it relies on?
Note: I know a few tools like Wienrie and remote debuggers that enable you to debug the application on the desktop; however, in my case it is not possible to simply point to the index.html file in the browser, since the application relies on the Java files.
The simple answer is NO, you can't run those Java plugins in a desktop browser.
Since the plugins are written in Java, I'm assuming your target platform is Android. Phonegap plugins provide native extensions to the native phonegap application. Although desktop browsers themselves can run Java, Phonegap plugins for Android are extensions which rely on the classes in the Android SDK and all the layers below that forming the Android operating system.
If it's not the Java plugins themselves you want to debug but the rest of the phonegap app written in Javascript, and if the plugins are not essential to the rest of the app, you could potentially stub them out. Then you'd be able to debug the HTML/CSS/JS using the phonegap emulator.
If the Java plugins are not easy to decouple or its the plugins themselves that need debugging, you'll need to run them in the native environment. This could either be on a physical Android device or a virtual device (Android emulator). Either way, you can use Eclipse to get debug information out of the device to see what's going on with your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With