Debugging sites in Firefox Android

2016-05-16 / Firefox Android

WebIDE helps debugging web pages in Firefox on Android, but I’ve been missing simple ways to inject code that can help me debug issues. Debugging can be very time consuming, and one is always looking for shortcuts. If it’s possible to throw in a script that, say, throws whenever IFRAME.src is set it can allow me to zoom in on a method I need to find.

In Presto-based Opera, the User JavaScript API was an excellent debugging aid, as was the “Refresh from cache” command. Good, old days. Well, I’ve been exploring ways to inject debug code and find similar shortcuts in Firefox on Android, and here’s an addon that promises enabling similar stuff. See the readme for details.

(It’s admittedly a little more painful that it should be to keep editing/removing/re-installing the addon - for now - so it should probably be rewritten to just read “patch” files from the file system and evaluate them inside the page - or something. That way, just adb push-ing a file to the phone would change the debug output. Maybe someone can help implementing that?)