最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Enable console.log when it is disabled - Stack Overflow

programmeradmin2浏览0评论

In a project, console.log is disabled. Firefox tells me it is disabled but I do not now where in the code and I do not want to look.

Is there a way for me to force enable console.log around my code?

In a project, console.log is disabled. Firefox tells me it is disabled but I do not now where in the code and I do not want to look.

Is there a way for me to force enable console.log around my code?

Share Improve this question edited Jan 2, 2015 at 20:13 Cisum Inas asked Jan 2, 2015 at 12:46 Cisum InasCisum Inas 13.1k11 gold badges43 silver badges56 bronze badges 3
  • developer.mozilla/en/docs/Debugging_JavaScript this might help you – Kalpit Commented Jan 2, 2015 at 12:48
  • I didn't know it was possible to disable it, are you using Firebug? you could try searching for console in about:config – Scriptable Commented Jan 2, 2015 at 12:48
  • read it maybe: stackoverflow./questions/21692646/… – A. Wolff Commented Jan 2, 2015 at 12:51
Add a ment  | 

2 Answers 2

Reset to default 4

If console.log() is disabled with redefined function like

console.log = function() {}

You can try to delete it and browser will restore the default console.log

delete console.log

As far as I know it is not possible to make "Firefox tells me it is disabled".

It is possible that someone replaced native browser "console.log" implementation.

To check what object is being referenced by "console.log" you should simply type it in Firebug console and check out the result.
By default it should print "function()".

发布评论

评论列表(0)

  1. 暂无评论