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:
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.