I use Firefox + Firebug for some Javascripting. The text I'm trying to log with console.log
does not immediately appear in Firebug's console. It seems like it piles up in a buffer somewhere, and then gets flushed to console in chunks. I have a function that makes a few log
calls. Sometimes I get just the first line, sometimes - nothing. I do, however, see the whole bunch of lines when I refresh the page.
Can I flush the console log manually?
Pythons print method as an exclusive attribute namely, flush which allows the user to decide if he wants his output to be buffered or not. The default value of this is False meaning the output will be buffered. If you change it to true, the output will be written as a sequence of characters one after the other.
Developers can improve the application debugging process by using methods to print various messages on the browser console. For example, the console. log() method helps us to print messages or data in the browser console.
You should use the console. log() method to print to console JavaScript. The JavaScript console log function is mainly used for code debugging as it makes the JavaScript print the output to the console. To open the browser console, right-click on the page and select Inspect, and then click Console.
The short answer is no. There is no flush. You could clear the console
console.clear();
But I don't think that's what you want. This is most likely from the code. If we can see it, I can revise my answer with better feedback.
If you want to see all the available methods under console, execute this in the command line:
for(var i in console) {
console.log(i);
}
or have a look at the wiki page of the console API.
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