Firefox mobile error console missing - javascript

I'm working on a mobile website, and it works fine in the Android stock browser. In Firefox some JavaScript functions don't work. So I was googling for the error console. I found a support page wich gives information about the error console of an early version.
Is there an error console in Firefox for mobile version 14 (2012-06-26)?

Looks like it is hidden, but adding browser.console.showInPanel and devtools.errorconsole.enabled then setting both to 'true' in about:config will enable the console and preferences panel for JavaScript debugging purposes.
Here is how to find the error console icon:
Firefox Mobile: Enabling the Error Console
It seems that the Error Console is deprecated, so bookmarklets are the simplest of the remaining mobile debugging alternatives:
Android Console:
javascript:(function(){if((/android/gi).test(navigator.appVersion)){console={"_log":[],"log":function(){var%20arr=[];for(var%20i=0;i%20\""+value+"\"");}},"show":function(){alert(this._log.join("\n"));this._log=[];}};window.onerror=function(msg,url,line){console.log("ERROR:%20\""+msg+"\"%20at%20\""+"\",%20line%20"+line);}window.addEventListener("touchstart",function(e){if(e.touches.length===3){console.show();}});}})();
Firebug Lite:
javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new%20Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened');

Related

How can I get Angular $log messages to appear in FireFox/FireBug console?

I'm using Angular 1.6.2. I find that messages from the $log service do not appear in the Console window for the FireFox browser with FireBug installed. (Firefox 52.0.1).
How can I get them to appear?
When I run the same Website in Chrome, IE, and Edge the $log messages appear happily. Even the sample in the Angular documentation (https://docs.angularjs.org/api/ng/service/$log) does not display a Console message in my FireFox.
Buried in the answers to this Question (Firebug console: not showing console.log) is
Firebug is officially discontinued now and the console output is broken in Firefox 51.0.1 due to a change in the Firefox internal APIs Firebug uses to access the related data....Firebug users are advised to switch over to the Firefox DevTools instead. There, the console output works as expected.
I'm using FireFox 52. I installed the FireFox developer edition and I can see $log messages in the console.

Show Javascript error count in Firefox without opening console

Now that Firebug has been subsumed into Firefox, how can I configure the browser to bring Javascript errors to my attention without having the console open all the time, as Firebug used to do by showing an error count on its toolbar icon?
The Firefox DevTools provide a so-called "Developer Toolbar" aka GCLI (openable via Firefox menu > Developer > Developer Toolbar or Shift + F2), which displays the number of errors on the page (besides providing many useful commands):
Update:
The DevTools team obviously plans to remove the Developer Toolbar, because of low usage and because it's unmaintained and for most of it's features are available somewhere else.
There is no replacement yet for the error count, though, but a comment on the related bug report indicates that it will be added back.
Another options is to use Chrome extension JavaScript Errors Notifier.
To install it in Firefox, you'll first have to install another extension Chrome Store Foxified, which enables you to install any Chrome extension from Chrome Web Store to Firefox. You can follow the instructions of Chrome Store Foxified to install the extensions you like. (Note that not all Chrome extensions will work in Firefox.)
If you want to install the Chrome extension permanently, you'll have to sign up with Mozilla to get the extension signed.
If the JavaScript Errors Notifier extension is successfully installed in Firefox, you'll see an icon appearing at the right end of the address bar.
And when there's any JavaScript error in the page, the icon will turn red. To see the details of the errors, you can click on the icon. And the extension have quite some options to tune the errors that you want to get alerted.

Chrome Console error

The issues I am having is with my Chrome browser. I am getting an error in the console which is creating problems with my development environment. This error on happens in Chrome and no other browser. Fire Fox, Safari and Opera are all fine without this error. Also I used a different computer here with the same version of Chrome (48) on the same WordPress website and did not get any console errors. This makes me think it is just on my computer and my browser. So the console error is the following:
Uncaught InvalidCharacterError: Failed to execute 'btoa' on 'Window':
The string to be encoded contains characters outside of the Latin1
range.
b.mxpnl.net/cs/dca.js?pid=39266&cid=49544_680_:1
I have found that it is making an external call for this script from b.mxpnl.net in the sources section of the inspect developer tools. It does not make this call with any other browser or in Chrome on a different computer, so again this is making me believe it is just on my computer, my Chrome. Could it be a malware or virus?
We spent all day on this. Turned out to be a extension installed. Disable them and retest.

How to enable javascript console on Android 4.2.2

I'm trying to enable the JavaScript Console to debug a webpage in the stock Android browser on a Samsung Galaxy S4 running 4.2.2.
On the S3 I just type in about:debug in the address bar and it comes up but it doesn't work on the S4, it seems to do an autocomplete for chrome://debug.
Firstly it would be great to know how to get the console open and secondly why would Chrome's autocomplete be coming up for the stock browser?
Thanks
I don't know how to activate this console.
But I have used a tool that can allow you to remote debug any browser with limited changes to your web page (only add one script).
It is VorlonJS and you can find demo here: http://vorlonjs.com/#demo
try this link remote debugging chrome.
Well if are you developing on android greater than 4.0.3 you can type adb logcat and you would be able to catch your console.log or errors.
Or if you want chrome enables mobile screen to test the view.It depends if you are testing the functionality or the graphics

Safari for Ipad not reporting line numbers on Javascript errors

I am using iPad 2 with IOs 5 to develop a web application.
I have enabled the developer console to get logs , but when javascript error occurs it does not include corresponding line number.
Since the web application handles touch and gesture events, I cannot test them on desktop version of the browser!
Any help will be appreciated.
You can add a window level error handler
http://dev.opera.com/articles/view/better-error-handling-with-window-onerror/
and have that console log the line number. You'll be getting two console logs per error, but you will have more control over the output.
You can try using regular Safari or Chrome and write it there first before using the iPad or alternatively there is the Weinre application that provides you a console like firebug / chrome developer tools.

Categories