Chrome: console.log, console.debug are not working

前端 未结 20 887
别那么骄傲
别那么骄傲 2020-11-29 02:52

Console.log and debug not printing, only return undefined. Why it can be? I\'ve tried to re-install chrome, but it doesn\'t help.

Here is screenshot from chrome\'s m

相关标签:
20条回答
  • 2020-11-29 03:43

    In my case was webpack having the UglifyPlugin running with drop_console: true set

    0 讨论(0)
  • 2020-11-29 03:43

    Make sure the filter box is empty

    0 讨论(0)
  • 2020-11-29 03:44

    In my case it was just an old cached Javascript file. After clearing the cache I saw my logs.

    0 讨论(0)
  • 2020-11-29 03:44

    In my case, i was not able to see logs because there is some text in Filter field, which caused results of console.log to disappear. Once we clear text in Filter field, it should show.

    0 讨论(0)
  • 2020-11-29 03:44

    As of July 2020 the Chrome UI has changed once again and the logging level dropdown doesn't seem to do anything now.

    Instead, there's a new pane to the left of the main console pane, which may have got unintentionally set to one of the restrictive logging levels:

    Select the top category (messages) to reveal all the logging:

    EDIT: EVEN THEN Chrome seems to add things to the Filter box, which again loses some logging, so you must CLEAR THE FILTER BOX TOO!

    (Filter box is at the top of both my pics above, under "Network conditions"; you can see that it has some contents about "urlwebpack" which I didn't put there!)

    0 讨论(0)
  • 2020-11-29 03:45

    For completeness: In the current version of chrome, the setting is no longer at the bottom but can be found when clicking the "Filter" icon at the top of the console tab (second icon from the left)

    0 讨论(0)
提交回复
热议问题