Yii 1.1: ChromePHP for Yii

4 followers

ChromePHP is a console logging extension for Google Chrome.

If, for some reason, you don't want to use the built-in logging feature that comes with Yii, and you are developing on a Chrome browser, this extension (ChromePHP) might cheer you up.

First, install the latest available ChromePHP Extension from here on your browser. This will put a little PHP+Chrome icon on your toolbar.

Download the ChromePHP class, and place it under your protected/vendors folder, and update your configuration file protected/config/main.php:

'import'=>array(
        'application.models.*',
        'application.components.*',
        'application.vendors.chromephp.ChromePhp',
    ),

And you are ready to go.

You can send Log, Warning and Error messages straight to your Chrome console:

ChromePhp::log('hello world');
        ChromePhp::warn('this is a warning');
        ChromePhp::error('this is an error');

For the full feature list (ie: Filestorage) please check out their site here: http://www.chromephp.com

Oh, and don't use it in production! ;)

Be the first person to leave a comment

Please to leave your comment.

Write new article
  • Written by: imehesz
  • Category: Tips
  • Yii Version: 1.1
  • Votes: +3 / -2
  • Viewed: 9,797 times
  • Created on: Dec 14, 2010
  • Last updated: never
  • Tags: ChromePHP, Chrome, Logging