• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. Debugging on Firefox OS
  5. Setting up to debug Firefox OS using Firefox Developer Tools

Setting up to debug Firefox OS using Firefox Developer Tools

In This Article
  1. Firefox desktop
  2. Enabling debugging
  3. Enabling console logging on a Firefox OS device
  4. See also

Firefox OS supports the same remote debugging protocol that Firefox mobile supports on Android. This means you can use the Firefox development tools to debug Gaia applications running on a Firefox OS device or emulator. In order to debug Firefox OS running on your device or on the Firefox OS Simulator, you need to use Firefox 18 or later; in addition, there are settings that need to be changed both in your desktop browser's configuration and on your Firefox OS device or simulator.

Note: If you want to debug apps on a Firefox OS device, and you are running Firefox OS 1.2+, your best option is to use WebIDE instead.

Firefox desktop

You need to be sure you have a build of Firefox 18 or later in order to have remote debugging support. If you don't already have a recent copy of Firefox, download the latest Nightly build to get access to all the latest features.

Once you're running an appropriate version of Firefox on your computer, type about:config in the URL bar and change the value of devtools.debugger.remote-enabled to true. Then you'll need to restart Firefox to get remote debugging enabled. After restarting Firefox, the Web Developer menu will have a new option, Tools > Connect...

Enabling debugging

When using the Firefox OS Simulator (or B2G Desktop), setting up for debugging is pretty easy. You don't need to do any port forwarding like you do when debugging on a physical device. Simply open your device's Developer settings and enable Remote Debugging.

Note: This no longer works on Firefox OS devices as of January 10, 2013. As of this date device builds of Firefox OS have debugging disabled. There will eventually be a way to build your own build with it re-enabled, but this doesn't exist yet. This document will be updated once that happens. In addition, the preference for turning off out-of-process support has been removed. For now, you'll need to do your debugging in the Firefox OS Simulator.

If using a real Firefox OS device, open the Developer settings and:

  • Turn on Remote Debugging.
  • Turn off Out-of-process support, until bug 797627 is fixed. Without doing so, only system scripts can be debugged.

Note: If you flash your device, you'll need to redo these configuration changes.

Now you're ready to use the debugger!

Enabling console logging on a Firefox OS device

On production builds of Firefox OS, console logging (for example console.log()) is disabled by default. In order to enable it, go to your device's Developer settings and enable Console Enabled.

Note: read On-device console logging for more details about how to use console logging on Firefox OS.

See also

  • Debugging on Firefox OS
  • Debugger
  • Developer settings on Firefox OS

Document Tags and Contributors

Tags: 
  • Debugging
  • Firefox OS
 Contributors to this page: chrisdavidmills, Leonarf, jryans, karthikvj, mdas, gsvelto, tregagnon, Jonathan_Watt, Sheppy, st3fan, dbruant, teoli
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:59:43 AM
See also
  1. Build and install
    1. Build and install overview
    2. B2G OS build process summary
    3. Build prerequisites
    4. Preparing for your first build
    5. Building B2G OS
    6. B2G installer add-on
    7. Building B2G OS for Flame on Mac OS X
    8. Choosing how to run Gaia or B2G OS
    9. Compatible Devices
    10. Installing B2G OS on a mobile device
    11. Creating and applying B2G OS update packages
    12. Building and installing FOTA community builds
    13. B2G build variables reference sheet
  2. Porting B2G OS
    1. Porting overview
    2. Porting basics
    3. Porting on CyanogenMod
  3. Developing Gaia
    1. Developing Gaia overview
    2. Running the Gaia codebase
    3. Run Gaia on desktop using Mulet
    4. Understanding the Gaia codebase
    5. Making Gaia code changes
    6. Testing Gaia code changes
    7. Submitting a Gaia patch
    8. Gaia build system primer
    9. Different ways to run Gaia
    10. Make options reference
    11. Gaia tools reference
  4. B2G OS APIs