Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebug console: not showing console.log

Tags:

I am trying to test something, and for one reason or another, while working in the Firebug console, I am unable to create an array of script tags on the HTML page using the getElementByTagName('script') method. I realize there is probably something stupid I am overlooking.

This is the dummy HTML page:

<html> <head>     <title>Random Crapolla Page</title>     <h1>Random Crapolla Page</h1> </head>  <body>     <div id="whyNot">     <p id="p1">         <a href="http://google.com">Here is link one</a><br />         <a href="http://google.com">Oh poop here's another</a><br />         <a href="http://google.com">And a 3rd for good measure</a><br />     </p>      <a id="p2">         Latin. Latin. Latin...<br />         Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum     </p>     </div>     <!-- Script tag testing-->     <script type="text/javascript" src="itDoesntExist.js"></script>     <script type="text/javascript" src="dummyJSnumeroDos.js"></script> </body> 

And this is what I'm typing into the Firebug console:

var scripts = document.getElementsByTagName('script'); console.log(scripts); 

enter image description here


All selected in Console enter image description here

like image 582
beckah Avatar asked Mar 19 '14 16:03

beckah


People also ask

How do I view the console log in Firefox?

You can open the Browser Console in one of two ways: from the menu: select “Browser Console” from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on macOS). from the keyboard: press Ctrl + Shift + J (or Cmd + Shift + J on a Mac).

Is console log () added to execution stack?

It's a function call. It goes to the call stack.

What does console log () do?

The console. log() is a function in JavaScript which is used to print any kind of variables defined before in it or to just print any message that needs to be displayed to the user.

Does console log slow down browser?

Yes, it will reduce the speed, though only negligibly. But, don't use it as it's too easy for a person to read your logs.


2 Answers

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. For reference, this is the error:

TypeError: ConsoleAPIListener is not a constructor console.js:149:38

Firebug users are advised to switch over to the Firefox DevTools instead. There, the console output works as expected.

like image 104
Sebastian Zartner Avatar answered Sep 19 '22 08:09

Sebastian Zartner


You have info selected, it will only show info. Click the All button!

enter image description here

And to show that it makes a difference, new screenshots

enter image description here

like image 23
epascarello Avatar answered Sep 17 '22 08:09

epascarello