nwzxdg
Last Updated: November 19, 2017
·
22.57K
· bluetidepro
6028b1c54dac0d98767d9efcb3d643b9

Use ChromePHP to debug PHP

I recently started using ChromePHP to do all my PHP debugging and it is a life savor! It is a great way to debug PHP code on the fly, in Google Chrome. It's very easy to integrate to any project and log any errors, warnings, function outputs, etc.

PHP example code for ChromePHP:

include 'ChromePhp.php';
ChromePhp::log('hello world');
ChromePhp::log($_SERVER);

// using labels
foreach ($_SERVER as $key => $value) {
    ChromePhp::log($key, $value);
}

// warnings and errors
ChromePhp::warn('this is a warning');
ChromePhp::error('this is an error');

Official site: http://www.chromephp.com
Chrome store link (free): https://chrome.google.com/webstore/detail/chromephp/noaneddfkdjfnfdakjjmocngnfkfehhd

Enjoy! :)

Say Thanks
Respond

2 Responses
Add your response

3858
17f1dc85e6bf0e7cd2525ed1b7fe3175

For those not using Chrome i would suggest phpconsole.com. It too works the same way.

over 1 year ago ·
29437

I used ChromePhp on Firefox for a while, after FirePHP stopped working. But now, although I'm loving Firefox Quantum, this new version of Firefox does not appear to support ChromePhp. I created QuantumPHP (https://github.com/frankforte/quantumphp) to get server logs into the browser and get on with my day - it appears to work on both Chrome and Firefox.
I also attempted to publish it on composer: frankforte/quantumphp. I hope it helps some others that prefer to develop with Firefox (especially now that it appears faster than Chrome).

7 days ago ·