Debugging the app

  • Revision slug: Apps/Tutorials/General/Debugging_the_app
  • Revision title: Debugging the app
  • Revision id: 346927
  • Created:
  • Creator: madarche
  • Is current revision? No
  • Comment Fixed template call

Revision Content

For debugging an app the first step is of course to debug by running a full-capabilities desktop browser such as Firefox. But once the app is installed on a platform (cf. Platform-specific details of app installation) it becomes a native app, it is run from inside the webapp runtime and things get more complicated.

To  debug problems when an app is running inside the webapp runtime one can run it from the command line by enabling the old (but still useful) Error Console.

For example if an App comes from http://areatweet.com/ and is installed in $HOME/.http\;areatweet.com/ (this is the case for a Linux Desktop cf. Platform-specific details of app installation) the webapp runtime will be found in this directory. One should then run the webapp runtime with the debugging option as follows:

$ ~/.http\;areatweet.com/webapprt-stub -jsconsole

Note that on Windows the webapp runtime is not named webapprt-stub but is named after the name of the App, but the principle remains the same.

Read Hacking Firefox OS for more information on debugging.

See also

Revision Source

<p>For debugging an app the first step is of course to debug by running a full-capabilities desktop browser such as Firefox. But once the app is installed on a platform (cf. <a href="https://developer.mozilla.org/en-US/docs/Apps/Platform-specific_details" title="https://developer.mozilla.org/en-US/docs/Apps/Platform-specific_details">Platform-specific details of app installation</a>) it becomes a native app, it is run from inside the webapp runtime and things get more complicated.</p>
<p>To&nbsp; debug problems when an app is running inside the webapp runtime one can run it from the command line by enabling the old (but still useful) <em>Error Console</em>.</p>
<p>For example if an App comes from http://areatweet.com/ and is installed in <code>$HOME/.http\;areatweet.com/</code> (this is the case for a Linux Desktop cf. <a href="https://developer.mozilla.org/en-US/docs/Apps/Platform-specific_details" title="https://developer.mozilla.org/en-US/docs/Apps/Platform-specific_details">Platform-specific details of app installation</a>) the webapp runtime will be found in this directory. One should then run the webapp runtime with the debugging option as follows:</p>
<pre>
$ ~/.http\;<code>areatweet.com</code>/webapprt-stub -jsconsole</pre>
<p>Note that on Windows the webapp runtime is not named <code>webapprt-stub</code> but is named after the name of the App, but the principle remains the same.</p>
<p>Read <a href="https://hacks.mozilla.org/2012/11/hacking-firefox-os/">Hacking Firefox OS</a> for more information on debugging.</p>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="https://developer.mozilla.org/en-US/docs/Apps/Platform-specific_details" title="https://developer.mozilla.org/en-US/docs/Apps/Platform-specific_details">Platform-specific details of app installation</a></li>
  <li><a href="https://hacks.mozilla.org/2012/11/hacking-firefox-os/">Hacking Firefox OS</a></li>
  <li>{{Bug(598012)}}</li>
</ul>
Revert to this revision