Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Contained in the Firefox OS Settings app is the Developer panel. This panel offers a number of options that can make debugging your open web app on Firefox OS easier. This article covers the options available and how to make use of them.

The settings panel for developer options is intentionally buried deep to avoid having end users who have no need for these options inadvertently turning on options that make their device run more slowly or add strange visual effects to their displays. The panel looks like this (the following is from a Geeksphone Keon running an April 2014 build of Firefox OS 2.0; yours may differ if you are running a different version):

The developer panel is reached as follows:

  • In Firefox OS <1.4, you open the developer panel via Settings > Device information > More Information > Developer.
  • In Firefox 1.4+, you have to enable the developer panel via Settings > Device information > More Information > Check the Developer Menu checkbox.  Once you've done this, you can then access the developer panel via Settings > Developer.

The following sections cover each of the options in the Developer panel, explaining what they do and why they're useful.

Important: These tools are useful, but can cause bugs during normal usage. Features that are known to cause bugs have been disabled by default. If you are experiencing problems, try disabling any developer features you've enabled.

Developer Tools settings

Debugging via USB

The "Remote debugging" option enables support for remotely debugging your Firefox OS device. This also enables ADB command usage. In Firefox <1.4 there is only a single checkbox; in Firefox 1.4 there are three options available in a select box:

  • Disabled: remote debugging is turned off (the default.)
  • ADB only: Allows access to the device by ADB.
  • ADB and Devtools: Allows access to the device by ADB and Firefox DevTools such as WebIDE.

DevTools via Wi-Fi

Note: Introduced in Firefox OS 3.0 and Firefox 39.0 (March 27th 2015 and newer)

Checking this checkbox allows you to connect your Firefox OS device to the WebIDE tool on Desktop Firefox via your local Wi-Fi network, allowing you to push apps to your device for testing, and more. For more instructions, read WiFi Debugging for Firefox OS by J. Ryan Stinnett.

DevTools Wi-Fi Device Name

Note: Introduced in Firefox OS 3.0 and Firefox 39.0 (March 27th 2015 and newer)

This text field allows you to set the name that your device will be identified by on your Wi-Fi network, when connecting to the DevTools via Wi-Fi (see previous section.)

Developer HUD

In Firefox OS 1.4+, tapping this section brings you to the Developer HUD selection view.

The top two checkboxes are:

  • Frames per second: Displays frames per second, as explained in the Frames_per_second section below.
  • Time to load: Displays time to load information, as explained in the Time_to_load section below.

Next, there's a slider you can use to enable or disable the display of debugging information overlaid on the phone UI, and the other developer options shown below it. The debugging information at the top of the UI is for the System app (and is only shown when Show system HUD is enabled.) The debugging information at the bottom of the UI is for the currently visible app.

The other options are:

  • Developer tools
    • Log changes in ADB: Enables logging of device changes to adb logcat.
    • Show system HUD: When checked, enables the display of debugging information about the System app.
    • Hide All HUD Elements: Hides all debugging information displayed by the DevTools. This is useful if, for example, you want to track your device's metrics (for logging or telemetry purposes) but you don't want to be bothered by graphical widgets.
  • Problems
    • Warnings: Displays console warnings.
    • Errors: Displays console errors.
    • Security issues: Displays potential security issues.
  • Performance
    • Reflows: Displays reflows as they occur.
    • Jank/Jank threshold: Notify the phone user about occurrences of unacceptably high jank, the threshold for which can be customized.
  • Memory
    • Unique set size: This is a measure of the memory used by an application that is unique to that application. This is the most important measurement to inform memory usage optimizations (trying to reduce the memory apps are using), but there are others. See this Performance tests section for more information.
    • App memory: Displays information on how much memory the app is using, and allows you to enable or disable the different memory usage factors. See App_memory below for more details.
    • JS objects: A measure of the memory the app is using on JS objects.
    • JS strings: A measure of the memory the app is using on JS strings.
    • JS other: A measure of the memory the app is using on other JS code features.
    • DOM: A measure of the memory the app is using on its DOM.
    • Style: A measure of the memory the app is using on CSS.
    • Other: A measure of the memory the app is using on other things not already covered by the above categories.

Frames per second

Enabling this option reports three numbers in the top left of the Firefox OS display; the values reported are an average of recent results within a sliding window, meant to be "instantaneous" but fairly accurate. As such, all numbers are "guesses":

  • The left number is the composition rate: the estimated number of times per second Firefox OS is drawing frames to the hardware framebuffer. This is an estimate of the user-perceived framerate, and only an estimate. For example, the counter may report 60 compositions per second even if the screen is not changing. In that case the user-perceived framerate would be 0. However, when used with this caveat in mind and corroborated with other measurements, the monitor can be a useful and simple tool.
  • The middle number is the layer transaction rate, the estimated number of times per second processes are repainting and notifying the compositor. This number is mostly useful for Gecko platform engineers, but it should be less than or equal to the composition rate number on the left.
  • The right hand number is a measure of the number of pixels drawn as a percentage of the screen size. A number of 273 means the screen was painted 2.73 times. Ideally this number should be as close to 100 as possible.

A screenshot of Firefox OS, showing three numbers in the top left hand corner that are measurements of app framerate.

Time to load

Firefox OS also has a tool that can help measure startup time, specifically the "first paint" time. The value shown by the tool — in the top right of the Firefox OS display — is the elapsed time between when the most recent application was launched, and an estimate of the first time that application painted its UI, in milliseconds. This number only approximates the real "first paint" time, and in particular underestimates it. However, lowering this number almost always correlates to improvements in real startup time, so it can be useful to quickly measure optimization ideas.

A screenshot of Firefox OS, showing a number in the top right hand corner that is a measurement of the current app startup time, in milliseconds.

App memory

Displays information on how much memory the app is using, and allows you to enable or disable the different items that use memory to show much each one is using in the current app. For example, the screen shot below only has App memory and JS objects checked, and the indicator on the bottom right is showing that the Settings app is using 414.77KB for JS objects.

Service workers

Note: Introduced in the new Firefox OS 2.5 (Q3 2015 and newer.)

Contains settings that control the behaviour of Service workers, as well as displaying a list of those currently active on the device. Available settings are:

  • Intercept requests: Effectively enables and disables the functionality of service workers, and their ability to intercept network requests.
  • Allow over HTTP: By default, service workers only work over HTTPS, as a security measure.

Graphics settings

Flash repainted area

In this mode, every time a region of the screen is painted by Gecko, Gecko blits a random translucent color over the painted region. Ideally, only parts of the screen that visually change between frames will "flash" with a new color. But sometimes more area than is needed is repainted, causing large areas to "flash". This symptom may indicate that application code is forcing too much of its scene to update. It may also indicate bugs in Gecko itself.

A screenshot of Firefox OS with a number of transparent overlays, showing the parts of the screen repainted with each new animation frame.

Overscrolling

This enables and disables the behavior in Firefox 2.1+ where the display stretches in an elastic manner when you scroll past the end of a page, then shrinks back again when you stop dragging the display. The behavior's full name is elastic overscroll.

Tiling (was Layers: Enable tiles)

Introduced in Firefox OS 1.4, this feature enables the painting of content to the screen in smaller chunks ("tiles") rather than painting the whole screen at once. This is mainly useful for platform QA work involving reducing checkerboarding and finding regression windows.

Low-precision painting

Enabling this option makes Gecko paint a low-precision (blurry) version of the content when scrolling really fast. This is useful because it's quicker to paint, and so helps us avoid displaying blank areas (i.e. checkerboarding) while scrolling quickly. It should only be visible to the user temporarily; once the user stops scrolling we fill in the low-precision areas with high-precision content.

Low-precision transparency

This is an additional flag for low-precision painting, which makes the low-precision content half transparent. This makes it a little more subtle and less jarring for the user.

Hardware composer (was Enable hardware compositing)

When enabled, this setting causes the device to use its Hardware Composer to composite visual elements (surfaces) to the screen.

Draw tile borders (was Layers: Draw tile borders)

This is very similar to the Draw layer borders option, the difference being that it also draws the borders for individual tiles as well as the borders around layers.

Draw layer borders

When this setting is enabled, a brightly colored border is added around all the different layers painted to the display — great for diagnosing layout issues.

A screenshot from Firefox OS showing an opened select form with the draw layers borders option enabled, resulting in colored borders being drawn on all the different rendered layers.

Dump layers tree

This option enables layers.dump, which causes a copy of the compositor's layer tree to be dumped to logcat on every frame composited to the screen; this is mainly useful for platform graphics performance work, rather than regular web development.

Dump layerscope

When enabled, this setting enables layerscope output dumping from the device so that you can view installed app layer info on desktop. Read Layerscope on the Mozilla Wiki for more details on how to use this feature.

Cards View: Screenshots

When enabled, this specifies that app screenshots will be taken when the open apps are displayed in card view. If disabled, app icons are shown in the center of blank cards for the card view instead.

Window management settings

Home gesture

Enabling this option allows you to swipe upwards towards the center from outside the screen to bring up the homescreen. Again, this can provide the same functionality as the equivalent hardware button if it is not available, and is intended for future use on devices that are likely to not have hardware home buttons, like tablets.

Continuous transition

This setting allows you to decide whether app keyboards open immediately or continuously (with a  transition). Disabling such transition effects are useful on low end devices, when they cause performance to suffer.

App transition

Turn this on and then off again and you will disable all app closing/opening transitions: all apps will now just show immediately, without the smooth animation, and keyboards will also open/close without animation. Like "Continuous transition enabled", this is meant for improving performance on low end devices, but it has more of an effect.

App suspending

If enabled, this specifies that when an app is killed in the background, it will be kept in history and reopened when you open it from homescreen/card view. If disabled, such apps are not kept in history/card view.

Copy/paste

Enables the currently experimental copy and paste features that are being implemented in Firefox OS.

Multi-screen

TBD

Debug settings

Pseudo-localization

When enabled, pseudo-languages like Accented English and Bidi English are available for selection in Settings > Languages.  With pseudo-localizations, you can test the localizability of your code in regular Gaia builds without having to add real language resources or having to speak a foreign language.  For instance, you can make sure the layout scales well with longer strings, preview the app in a fake RTL language, or spot HTML elements wihout the data-l10n-id attribute (they will be displayed in regular English).

Screenshot of pseudolocales

When you build Gaia, you can show pseudo-localizations in the language list by default by adding the following line into gaia/build/config/common-settings.json:

 "devtools.pseudolocalization.enabled": true

Depending on the build configuration, pseudo-localizations are either built on buildtime (which takes up disk space) or generated dynamically on runtime (impacting performance and memory footprint).

  • Buildtime: you can add pseudo-localization language codes (fr-x-psaccent and ar-x-psbidi) to shared/resources/languages.json or any other JSON file that you use as LOCALES_FILE (see building multilocale Gaia).  This is desirable for testing the performance of non-English languages. For instance:

    {
      "en-US" : "English (US)",
      "fr-x-psaccent" : "Ȧȧƈƈḗḗƞŧḗḗḓ Ḗḗƞɠŀīīşħ",
      "ar-x-psbidi" : "ɥsıʅƃuƎ ıpıԐ"
    }
    
  • Runtime: if the pseudo-localization were not built on buildtime, it is still possible to resort to dynamic runtime generation. This allows to test localizability even on existing builds and without the need of re-flashing a new build. Keep in mind that runtime pseudo-localizations have different performance and memory characteristics and should not be used for measuring and comparing the performance of non-English languages.

Log slow animations

This tool tries to help developers understand why animations are not offloaded to the compositor to be run efficiently as possible. It reports "bugs" like trying to animate elements that are too large, or trying to animate CSS properties that can't be offloaded. The messages you'll get on the device will look like the following:

I/Gecko   ( 5644): Performance warning: Async animation disabled because frame size (1280, 410) is bigger than the viewport (360, 518) [div with id 'views']

Geolocation output in ADB

Enables logging of geolocation data to adb logcat. This helps with debugging both the GPS stack (namely we get NMEA callback) and MLS use.

Ignore GPS locations

Enabling this option forces the Geolocation API to ignore location information derived from GPS (the API will only get location info from network-based location services.) This is useful when debugging issues with Gonk's GPS geolocation provider; see bug 1056857 for more information.

Wi-Fi output in ADB

Enabling this option adds information about Wi-Fi to the adb logs (error logs from the console can be accessed using adb logcat | grep "Error" in the Terminal.)

Bluetooth output in ADB

Enabling this option adds information about Bluetooth to the adb logs (error logs from the console can be accessed using adb logcat | grep "Error" in the Terminal.)

Bluetooth HCI Sniffing Logs to SDCard

Enabling this option causes the device's HCI sniffing logs to be recorded to its SDCard.

NFC output in ADB

Enabling this option adds information about NFC to the adb logs (error logs from the console can be accessed using adb logcat | grep "Error" in the Terminal.)

RIL output in ADB

Enabling this option adds information about RIL to the adb logs (error logs from the console can be accessed using adb logcat | grep "Error" in the Terminal.)

Network Output in ADB

Enabling this option adds network information to the adb logs (error logs from the console can be accessed using adb logcat | grep "Error" in the Terminal.)

MMS Output in ADB

Enabling this option adds MMS output to the adb logs (error logs from the console can be accessed using adb logcat | grep "Error" in the Terminal.)

Console enabled

When enabled, this option lets you use the Web Console in Firefox to remotely access the console output on the device; without this option enabled, the console.log() function does nothing.

Gaia debug traces

Enabling this directly enables DEBUG traces in Gaia; see bug 881672 for more details.

Note: Unfortunately, not every app supports this mechanism to print their debug log. Instead, they control a "DEBUG" flag in code directly, so enabling this flag does NOT ensure that you'll see all debug logs.

Show screen reader settings

This enables the Screen Reader setting, subsequently found under Settings > Accessibility. Enabling this option turns on Firefox OS's screen reader. This is technology that allows a blind person to use a Firefox OS device. Currently at a very early stage, it changes the way the standard touch events work. When the screen reader is on, you must interact with the screen as follows:

  • Touch somewhere to focus that app (or whatever) and be alerted as to what it is. This is indicated both by audible speech output and a rectangle around the selected item. Double tap anywhere on the screen (two taps in rapid succession) to activate the item that has the rectangle around it.
  • Swipe from left to right to move sequentially through items on the screen. Items are moved through from left to right, then top to bottom, including scrolling the screen vertically if there are more items to display, and you will be alerted as to each one's name via speech output and a rectangle. Swiping right to left moves through the items in reverse order. Again, double-tap the screen to execute the currently highlighted item.
  • Do a swipe with two fingers — left, right, up or down — to scroll the screen in that direction. This is equivalent to swiping one finger across the screen in the given direction when the screen reader is not running. For example, a two-finger swipe left on the first home screen will flip to the second one, and a two-finger swipe upwards on a home screen or browser would cause the screen to scroll downwards to show more content.

Note: If you have turned the screen reader on and wish to disable it again, you must navigate back to the setting via these new gestures and double-tap the checkbox once it is highlighted to turn it off again. That will restore the touch screen functionality to its default behaviour.

In Firefox 1.4 and above, there is a quick toggle for the screen reader. Press volume up, then down, three times (up, down, up, down, up, down). The screen reader will instruct you to perform this same action again (volume up, down, up, down, up, down) to turn it on if it is not running, or to turn it off if it is already running. If you do not want to change the current toggle state, simply do something else. That way, you can turn it on and off at will to test your web application for accessibility without having to navigate the accessibility settings menu each time.

Speech volume

A slider that controls how loud the speech is delivered.

Speech rate

A slider that controls how fast the speech is delivered.

Use Marketplace reviewer certs

Marketplace reviewer certs are used during the Firefox Marketplace review process, to allow reviewers to install apps from non-Marketplace locations (e.g. reviewer pages.) This option enables a device to use these certs.

Shake to save system log

Note: Introduced in Firefox 2.2

Enables Logshake, which polls the phone for high-acceleration movements. Upon detecting such a movement — i.e. when you shake the phone — it logs contents of the system log/logcat to the device's SD card, at logs/<datetime>. See bug 1019816 for more information.

Verbose app permissions

Note: Introduced in Firefox 2.1

When this is enabled, developers (and privacy enthusiasts) may modify all permissions granted to installed privileged apps, using The "App Permission" pane in the Settings app, rather than just a small subset that make sense to non-developers (such as Geolocation). For example, "Schedule Alarms" appears with choices of Ask, Deny and Grant. Note that some apps may be unable to deal with changed permissions. If you experience any odd behavior, consider resetting the permission or re-installing the app.

Enable pinning the web

Note: Introduced in the new Firefox OS 2.5 (Q3 2015 and newer.)

Enables the experimental Pin the Web feature, which allows you to pin individual web sites/pages to your homescreen in the same fashion as installed apps. Read Pin the Web for more information.

Launch first time use

The "Launch first time use" button runs the "First-Time Use" (FTU) program; this lets you go through the initial setup and tutorial process, and is useful when trying to debug that process, or if you want to re-configure your device from scratch.

Unlock privileges

Full DevTools

Note: Introduced in Firefox 2.2

This button allows you to enable unrestricted devtools mode where you can debug and override system applications from WebIDE. For security reasons, enabling this mode is going to wipe device data. Note that once this mode is enabled, it is highly suggested to setup a pincode to unlock your device as this features enables easy access to internal data of your system applications (private informations, passwords, etc.).

The setting above works on any device, with root access or without. If you have a device with root access, then you may prefer to unlock full DevTools from within WebIDE, which does not erase any data.

Software updates

Update channel

Enables you to specify different update channels to get software updates from when your device receives OTA updates. Options are nightly, aurora, and others.

Update URL

Enables you to specify different URLs from which to receive your updates.

Obsolete settings

This section lists settings that are no longer provided, or no longer exist in the same state, but might still be interesting if you are running an older version of Firefox OS.

Accessibility

In versions of Firefox earlier than newer 1.4 versions, this controls the accessibility settings, as explained in the Show_screen_reader_settings section above.

Grid

The "Grid" option, when enabled, causes the Firefox OS display to be overlaid with a grid pattern to help you gauge positioning and alignment of items. For example, below we see the Browser app running with the Grid option enabled:

The grid's heavier lines are 32 pixels apart, both horizontally and vertically.

Software home button

Enabling this option creates a software home button that can provide the same functionality as the equivalent hardware button if it is not available. This is intended for future use on devices that are likely to not have hardware home buttons, like tablets.

Show frames per second

In Firefox OS versions older than newer 1.4, enabling this displays frames per second, as explained in the Frames_per_second section above.

Show time to load

In Firefox OS versions older than newer 1.4, enabling this displays time to load information, as explained in the Time_to_load section above.

Rocketbar enabled

In Firefox OS versions older than newer 1.4, this option enables the new Firefox Rocketbar on your device, which provides a useful new way to switch between apps, search, and more. When enabled, you'll find a search icon at the top left of the device, and the RocketBar can be brought up by swiping from the top left of the device towards the bottom left.

Note: In newer versions of Firefox OS, Rocketbar is enabled automatically and cannot be turned off.

Contacts debugging output in adb

Enabling this option adds debugging information about contacts to the adb logs (error logs from the console can be accessed using adb logcat | grep "Error" in the Terminal.)

Progressive paint (was Layers: Progressive paint)

This was introduced to help with debugging of the Async Panning/Zoom module (APZ) during its implementation. Now APZ implementation is complete, this option is deprecated, and will be removed from future versions (see bug 1003228).

Displayport Heuristics

  • Default
  • Center displayport
  • Assume perfect paints
  • Taller displayport
  • Faster paints
  • No checkerboarding

These options were introduced to help with debugging of the Async Panning/Zoom module (APZ) during its implementation, specifically to allow QA to experiment with different repainting heuristics to see which resulted in the least amount of checkboarding. Now APZ implementation is complete, these options are deprecated, and will be removed from future versions (see bug 1003228).

Enable APZ for all content (Async Pan/Zoom)

When enabled, the Async Pan/Zoom module allows panning and zooming to be performed on asynchronously, on another thread, with some noticeable differences to rendering behaviour. To find out more, read the MozillaWiki APZ article. Now APZ implementation is complete, this option is deprecated, and will be removed from future versions (see bug 1003228).

Edges gesture

Enabling this option allows you to swipe left and right from outside the screen towards the center, to navigate to the next and previous sheets (either web pages in the browser, or views inside another app.) This basically works like the browser navigator bar in Firefox, but is enabled by default in Firefox 2.1+.

Keyboard layouts

In addition to the developer-specific options listed above, Firefox OS < 1.4's developer settings featured keyboard layout options. These let you toggle on and off the then-experimental Chinese input methods:

As of Firefox 1.4, these options have been removed. This is because the Chinese keyboard layout implementations (zhuyin and pinyin) have now been completed.

Note: For other keyboard layouts still under development, such as Japanese, we now have a build-time config to opt them in.

 

Document Tags and Contributors

 Last updated by: chrisdavidmills,