Since yesterday, for some reason each time I try to display the console log in Firefox I get an undefined instead:
I use this tool quite often, and just recently I saw that this is not working anymore. I have seem similar questions on Stack Overflow, but none of them with an answer to fix it.
This is what I have done so far to try fix it. I have already
And nothing seems to work. However, when I type "console" and hit the run button I get:
Is it a set up that I have to change?
Firebug is no longer being maintained. From getfirebug.com:
The Firebug extension isn't being developed or maintained any longer. We invite you to use the Firefox DevTools instead, which ship with Firebug.next
See also Migration from Firebug guide.
Further to Domenic D.'s answer, I thought it might help others to give a fuller explanation.
It's showing 'undefined' because that's the return value of the function console.log().
It isn't outputting 'test' into the console because Firebug is no longer maintained and doesn't support the latest versions of Firefox. One of the problems I've noticed as a result of this, is that logging using console.log() doesn't show up in the Firebug console anymore.
Unfortunately (if you are used to Firebug), the solution is to use Firefox's built in developer tools instead.
To load the console using Firefox's built in tools, press ctrl+shift+k. Here, console.log() will work as expected. For example, running console.log('test') as you have above, will output 'test', then undefined (the return value of console.log()).
Keep Firefox and Firebug both tools opened. Do whatever you want in Firebug and the result will appear in the Firefox console.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With