ChromePHP for Yii

You are viewing revision #1 of this wiki article.
This is the latest version of this article.

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! ;)

3 1
4 followers
Viewed: 18 679 times
Version: Unknown (update)
Category: Tips
Written by: imehesz
Last updated by: imehesz
Created on: Dec 14, 2010
Last updated: 13 years ago
Update Article

Revisions

View all history

Related Articles