开发者

console.log doesn't print the message to the firebug console?

I am facing this weird problem. The WebApp I'm debugging right now, is invoking the javascript console.log/console.log/error/debug/etc., the Firebug console however, doesn't print them at all. This application uses Dojo/Dijit toolkit. Not sure if there is anything special about it

It doesn开发者_C百科't appear to be a problem with the Browser, I tried another simple web-page with a console.debug call, and the message appears on the console as expected.

Please advise about what should I look for. I have also tried Chrome/IE.

Thanks in Advance/


console is not write protected, it can be replaced with anything. You could try

alert(console.log.toString());

to find out what console.log really is

Edit:

A better method would be

var originalConsole = console;
// now include your library
// ...
originalConsole.log(console.log);

In Firebug, clicking on the function takes you directly to its definition.


did you try window.console.log()? Maybe you are not in window scope


In case like this do not forget to check if "Logging" is enabled or active at your console of browser.


Just to update this question -: Ensure that firebug is Enabled - - > On for all Web Pages. Reload the application. Then in the firebug panel - - > Console - - > All. All the console.log messages will appear.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜