How to debug Apache Cordova/Phonegap applications using Firefox


When you are developing for Android, iOS, and others mobile devices, a debugger can be very useful. Unfortunately, it was not easy to debug Cordova/Phonegap apps.

In this post I’m going to show you how to use the new Firefox WebIDE, with this tool, you will be able to debug, check the console, and test your apps instantly.

I - About Firefox OS and Firefox App Manager

Ok, first, you need to understand how the debugger will work.

You will be able to debug Firefox OS applications created with Cordova, Phonegap, or any HTML5 framework.

Some of the Cordova/Phonegap plugins are compatible with any platform, so, before start coding and debugging, check this link to see if all plugins used is compatible.

Cordova/Phonegap is going to be completely compatible with Firefox OS, so we will be able to debug any application soon.

II - Installation

First, download and install the last version of Mozilla Firefox.

You can use any version, but I recommend you to get the last stable version.

Now, open Firefox Menu -> Developer -> WebIDE. Click on Select Runtime, install an emulator, and then click on the emulator name to start it.

III - Usage

Read more here.

Now, on Cordova CLI, run the command bellow to add the Firefox OS:``

cordova platform add firefoxos  

On WebIDE, clicks on “Open Packaged App”, and select the directory containing your Cordova app’s config.xml file.

Now you can run, edit and debug your app easily. This workaround may help because you can easily debug Cordova APIs.

Thank you for reading, any question, problem, suggestion or anything, feel free to comment here!

Aron Bordin

Aron Bordin
Computer Science Student and AI researcher. Always coding something fun :)

[Tutorial] Developing Android Background Services

### Welcome!In this post, I'll show you how to develop background services on Android Studio. We'll see two type of services: `Service` a...… Continue reading