Console logging turned off (4 posts)

  1. Jacob N. Breetvelt
    Posted 2 years ago #

    I am a plugin developer and have a lot to troubleshoot. Always WP_DEBUG on etc.

    The WP Admin pages seem to turn off the extremely usefull developers tool console.log(text); ( Firefox )

    How can I prevent wp admin to switch off console logging?

  2. bcworkz
    Posted 2 years ago #

    How are you getting PHP to output to the console on non-admin pages?

    The only way I know of, which works for both, is echo "<script>console.log('$value')</script>";.

  3. Jacob N. Breetvelt
    Posted 2 years ago #

    I also have a js file for my admin pages, and when a js error occurs, the error is not logged in firefox's firebug, but i often get the message (translated from dutch) 'a script on this page has turned off console logging ( errors, warnings and messages )'. This is what i want to prevent, because i want to see the errors and not guessing them...

  4. bcworkz
    Posted 2 years ago #

    Ah, I see now. That would have to come from some other JS or jQuery script. I don't know of anyway to do that with PHP .(But there are a lot of things I don't know, so there might be a way, but it doesn't make sense for server side script to care much about client behavior) I am always seeing JS warnings about jQuery using some deprecated function when using admin pages of a fresh install from subversion, so whatever is turning off logging is not part of the default configuration.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.