Is it possible to flush the console (make it print immediately)?

偶尔善良 提交于 2019-12-08 17:41:45

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/22306279/is-it-possible-to-flush-the-console-make-it-print-immediately

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!