Monday, June 22, 2015

Providing Developer Debugging Feedback on Firefox OS

I reported a bug on Alex's LibriFox app which is preventing book files from playing.  Alex has been unable to reproduce the bug, since the downloaded book plays on his phone, but it won't play on mine.  He sent me an email this morning detailing the steps I need to take to provide him with useful information from my phone about the bug.

Since this process will be generally useful, I'll describe in detail what he told me to do and what happened (Alex's instructions are in green).

1. First, go into developer tools and make sure Console enabled is checked.  For whatever reason, it won't log errors to console without that checked (even though it seems to log console.log statements just fine).  We want errors to be logged, so enable that.

After clicking on the "Settings" icon on the home screen, and then the "Developer" link, I arrived at the screen above and confirmed that "Console enabled" was already checked.

2. Next, open the app via the IDE (with your flame connected and set as the USB device) and click the wrench to open developer tools.  Go to the console tab.

Don't do any app navigation until you have opened the console!
Once the console is opened, tap your downloaded book, then the downloaded chapter to take you to the (not working) player page.

It is so cool how well this works!  I connected my device via USB, then selected "Firefox OS (Flame)" from the "Select Runtime" in the Web IDE.  After giving permission on the phone to connect, I was able to select the installed LibriFox from App menu in the upper left of the Web IDE. I didn't even have to click on the wrench, it was already selected, and I saw what is in the screen shot above.

3. If there is an error being thrown somewhere, your console might look something like this.  I've added a throw statement in my code to try and simulate your issue.
Inline image 1

If the file can't be found, your console will look something like this:
Inline image 2

Both of these cases will result in a non-functional player and no chapter title in the header, so without seeing console I can't tell which is which.

Clicking my way through the app as instructed, I saw this:

Now I'll wait and see what Alex can do with this information.

What I keep liking about this OS is how friendly it is to developers.  That really isn't surprising, given Firefox's mission of "making the Web better and more accessible for everyone everywhere", but it is great to see this mission being carried out so well!

No comments:

Post a Comment