Firebug Lite on Chrome - how to log to console with PHP
I installed the extension Firebug Lite in Chrome. In Firefox I use FirePHP to log messages in the console, but I can't get it to work in Chrome.
I also installed ChromePHP. With this I can log messages t开发者_JAVA百科o the built-in Developer Tools for Chrome, but I wish to log to Firebug Lite !
Is this even possible to send a message to the console in Firebug Lite from PHP?
You can't do that in the normal Firebug either (I'm talking about Firefox). You have to use FirePHP for that purpose. So you can't do that in Firebug Lite, and I don;t think that there is any extension similar to FirePHP for Chrome (that would interact with Firebug Lite). For PHP &Ajax debugging I am using PHP Console extension https://chrome.google.com/webstore/detail/nfhmhhlpfleoednkpnnnkolmclajemef?hl=en-US.
UPDATE I found a better solution, and that is: https://github.com/andrewn/firephp-chrome. The best part about it is that it allows the Chrome console to display FirePHP messages. There are some bugs, but I'm quite satisfied with it.
You will have to echo it out to javascript.
function ConsoleLog($message)
{
echo '<script>console.log("' . $message. '")</script>';
}
If you are looking for a simple/lightweight solution you can also try ChromePHP:
https://chrome.google.com/webstore/detail/noaneddfkdjfnfdakjjmocngnfkfehhd
Getting started guide available at:
http://www.chromephp.com
精彩评论