mozilla

Revision 327103 of Debugging Firefox OS apps using remote Firefox debugging tools

  • Revision slug: Mozilla/Boot_to_Gecko/Debugging_Firefox_OS_apps_using_remote_Firefox_debugging_tools
  • Revision title: Debugging Firefox OS apps using remote Firefox debugging tools
  • Revision id: 327103
  • Created:
  • Creator: willkg
  • Is current revision? No
  • Comment Fixed a typo.

Revision Content

 

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. This article is a guide to how to set up and use the remote debugging tools.

 

In order to debug Firefox OS into your device or B2G Desktop, you need to use a Firefox Nightly and change a few settings on both Firefox Nightly and Firefox OS.

 

Firefox Nightly

Get a fresh copy of Firefox Nightly if you don't have one at nightly.mozilla.org, uncompresse it, run the firefox nightly (just remeber to close all others firefox that you might have).

Type about:config and turn devtools.debugger.remote-enabled to true . Then just restart your Firefox Nightly and you will see a Remote Debugger menu item under Web Developer menu.

Firefox OS

This option works on recent gaia builds. Go to Settings -> Device Information -> More Information -> Developer  and turn on Remote Debugging.

 

Debugging

For device debugging, you will need to be with the device pluged in on your usb port, make sure lsusb and adb can see it. And you need to foward the port in adb by doing adb forward tcp:6000 tcp:6000 on terminal.

Now we just need to acess in Firefox Nightly the menu Tools -> Web Developer -> Remote Debugger. It will ask you to put the <IP>:<PORT> where you want to debug, just leave as it is 'localhost:6000'. Press OK and its all done, wait a few seconds, you can start debugging.

 

Have a nice Debug!!

Revision Source

<p>&nbsp;</p>
<p>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. This article is a guide to how to set up and use the remote debugging tools.</p>
<p>&nbsp;</p>
<p>In order to debug Firefox OS into your device or B2G Desktop, you need to use a Firefox Nightly and change a few settings on both Firefox Nightly and Firefox OS.</p>
<p>&nbsp;</p>
<h3 id="Firefox_Nightly">Firefox Nightly</h3>
<p>Get a fresh copy of Firefox Nightly if you don't have one at&nbsp;<a href="http://nightly.mozilla.org/" title="http://nightly.mozilla.org/">nightly.mozilla.org</a>, uncompresse it, run the firefox nightly <em>(just remeber to close all others firefox that you might have).</em></p>
<p>Type<em> about:config</em> and turn <strong>devtools.debugger.remote-enabled </strong>to<strong> true</strong>&nbsp;. Then just restart your Firefox Nightly and you will see a Remote Debugger menu item under Web Developer menu.</p>
<h3 id="Firefox_OS">Firefox OS</h3>
<p>This option works on recent gaia builds. Go to <strong><em>Settings -&gt; Device Information -&gt; More Information -&gt; Developer</em></strong> &nbsp;and turn on <strong>Remote Debugging</strong>.</p>
<p>&nbsp;</p>
<h3 id="Debugging">Debugging</h3>
<p>For device debugging, you will need to be with the device pluged in on your usb port, make sure <em>lsusb</em> and <em>adb</em> can see it. And you need to foward the port in adb by doing&nbsp;<strong>adb forward tcp:6000 tcp:6000 </strong>on terminal.</p>
<p>Now we just need to acess in Firefox Nightly the menu <strong>Tools -&gt; Web Developer -&gt; Remote Debugger</strong>. It will ask you to put the &lt;IP&gt;:&lt;PORT&gt; where you want to debug, just leave as it is 'localhost:6000'. Press <strong>OK</strong> and its all done, wait a few seconds, you can start debugging.</p>
<p>&nbsp;</p>
<p>Have a nice Debug!!</p>
Revert to this revision