How can I see the console in Firefox for Android?
I'm trying to debug a site that doesn't show up properly in Firefox for Android. Specifically, we're using wavedrom to render fields, and they work fine on Desktop, but Android doesn't work.
I'm trying to figure out how to show the javascript console, but all documentation seems to be incorrect. I initially found https://developer.mozilla.org/en-US/docs/Mozilla/QA/Firefox_Mobile:_Enabling_the_Error_Console, but that says it's out of date and that for Firefox 14+ I should consult https://hacks.mozilla.org/2012/08/remote-debugging-on-firefox-for-android/. I followed that, but never got it to connect. (Incidentally, the second article has a link to https://lists.mozilla.org/listinfo/dev-apps-firefox which apparently doesn't exist anymore. Maybe the article should be updated?)
The closest I've gotten is https://developer.mozilla.org/en-US/docs/Tools/about:debugging, which is very similar to the previous article. Note that the network debugging doesn't work. I can see devices over USB, and I can try connecting to a particular tab, however doing so gives me the error "typeerror this.topwindow is null".
I'm running the latest version of Firefox for Android, which is 68.6.0. My desktop browser says "The minimum supported version is (72.0a1)." However, there is no such version.
How can I see the console output?
I just want to get the console output. Is there any
כל התגובות (5)
If you wan to debug modern Firefox with a regular desktop build then I recommend using Firefox Preview. It will connect to about:debugging.
If you must use Firefox for Android then you may need to use Firefox ESR builds to connect to Firefox for Android. You would use the WebIDE to connect to Firefox in this case.
Windows can cause some trickyness when it comes to connecting a device over ADB. Try to verify that ADB can see your device over the USB connection. The other thing that can cause conflicts is the system ADB running which blocks the ADB running inside Firefox. Use the task manager to kill any adb processes.
I was able to connect over USB, and I could see the list of tabs, but actual debugging didn't work -- it gave me an error about the minimum supported version and "typeerror this.topwindow is null".
I just want to view the console, to figure out why some Javascript code is crashing on Firefox for Android. This doesn't happen when I use the developer console on my desktop. And console messages don't appear to be printed to "adb logcat".
Is the documentation out of date? Why does Firefox say I need to get a newer version when 68.6.0 is the latest available? Is Firefox for Android deprecated and no longer receiving updates? If I use ESR, do I no longer have the ability to use modern Firefox on my desktop?
Hi Sean
You can still run ESR alongside a recent build of Firefox (I am running Firefox release, Developer Edition and Nightly on my laptop).
Do you have an example of a page where this problem is occuring?
השתנתה ב־
I'm unable to replicate the problem now. It was a page generated by the Sphinx documentation system on an internal build server, so perhaps it was a caching issue, an addressing issue due to being on an intranet, or an issue that was fixed upstream. Since I couldn't access the console, I can't know what the problem is.
It seems like there's a bug somewhere, and it's not obvious that the ESR build needs to be used. Should https://developer.mozilla.org/en-US/docs/Tools/about:debugging be updated to reflect the fact that ESR needs to be used? It says that users should install the latest version of Firefox on their device, but that doesn't seem to actually work.
Is there any other way to get the console, given that Remote Debugging doesn't seem like a stable interface?
I am sorry for the delay in replying.
So that I can try to replicate it here, are you trying to connect ESR to Firefox Preview?