Remote Debugging in Firefox for Android

This is going to be an awesome news for the web developers specially those in to mobile web: Firefox for Android now supports remote debugging feature which is almost a boon for the developer community around the open source browser from Mozilla. Firefox for desktop already offers many developer-friendly features and add-ons like Firebug. This latest feature will simplify the task of developers to develop and test their mobile sites and web apps.

The remote debugging feature allows developers to utilize tools and features available on desktop browser to optimize and test web pages for a mobile browser. Just to mention here, Opera Mobile and Chrome for Android already support remote debugging.

How To Enable Remote Debugging in Firefox Mobile?

This feature is supported in Firefox 15 (and later versions) which is currently in beta phase. The best option would be Firefox Nightly build as it previews all the upcoming features in the Firefox and is available for the Android platform as well. Follow these steps to start with the remote debugging in Firefox:

remote-debugging-firefox-android

  • On desktop, go to about:config and set the preference devtools.debugger.remote-enabled to true and restart the browser. You can now notice an option for remote debugging in the Web Developer menu of Firefox as shown in the above screenshot.
  • Connect the Android device running Firefox to your computer via USB.
  • In a terminal, enter the following command: adb forward tcp:6000 tcp:6000
  • Enable the devtools.debugger.remote-enabled preference on the Firefox for Android too.
  • Now initiate the remote debugging from the Web Developer menu of the desktop client. You should notice a connection prompt on the mobile client.

For detailed instructions, refer Mark Finkle’s blog here.