How to debug a javascript file on a Firefox OS device
For active debugging, you can use the about: app-manager page in Firefox browser. You can install ADB (Android Debug Brdige) to connect FirefoxOS device with browser:
// install ADB
// Linux
apt-get install android-tools-adb
// OSX
brew install android-platform-tools
Then you can connect to your device using ADB commands:
// connect to your device / change IP
adb connect 192.168.1.5
// connect as root
adb root
// get a shell to your device, Ctrl-D will quit
adb shell
// enable port forwarding to use app-manager in your Desktop Firefox browser
adb forward tcp:6000 localfilesystem:/data/local/debugger-socket // or ADB Helper
// get the log output
adb logcat
When connected, you must connect the manager application to your device inside the Desktop Firefox browser. Then you can run the application you want to debug. You get an inspector, console, and debugger (Firefox dev tools), just like you would for every other website.
If you need to save your changes, you need to save the files you want locally and use adb pull / push to transfer files and back to devicce:
adb pull /system/b2g/webapps/browser.gaiamobile.org/application.zip
adb push application.zip /system/b2g/webapps/browser.gaiamobile.org/application.zip
source to share
You can download Firefox Developer edition browser for your desktop / PC, then go to webIDE from setting and download Firefox OS.Go simulator in webIDE, you can select any downloaded application in simulator to debug.
To download the Firefox developer browser follow the link: https://www.mozilla.org/en-US/firefox/channel/#aurora
source to share
Currently, you can debug certified apps on the phone if you have enabled DevTools limited rights via the Runtime-> Runtime Info toolbar menu when you are connected to a device. However, you cannot edit JavaScript files. To do this, you need to check Gaia and flash it to your phone. Perhaps you can also use adb pull / push to replace your current system apps. If you want to check Gaia take a look at this page: https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia source for apps: https://github.com/mozilla-b2g/gaia/tree/master/ apps
source to share