I'm trying to log some data from my javascript code to check if its right, but it doesn't seem to be working. Even when I type into the console:
console.log("hello");
the console just returns undefined (which is correct) but it also doesn't log the "hello". If it matters, I'm using adblock and hoverzoom as my extensions. Also, I'm on a macbook pro. Any ideas on why this doesn't work?
Click the Console tab. Press Control + [ or Command + [ (Mac) until the Console is in focus. Open the Command Menu, start typing Console , select the Show Console Panel command, and then press Enter .
This is because console. log() does not return a value (i.e. returns undefined). The result of whatever you entered to the console is first printed to the console, then a bit later the message from console. log reaches the console and is printed as well.
Most likely, you have some JavaScript in your code that overwrites console.log
for compatibility reasons (this will also affect the console of the application's tab). You can verify that by pressing F12 in this tab and checking that console.log
still works fine.
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