Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A configurable set of panels that display various debug information about the current request/response.
PHP CSS JavaScript
branch: master

This branch is 9 commits ahead, 5 commits behind pvolyntsev:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
assets
messages
panels
views
widgets
README.markdown
YiiDebug.php
YiiDebugCacheProxy.php
YiiDebugComponentProxy.php
YiiDebugController.php
YiiDebugToolbar.php
YiiDebugToolbarPanel.php
YiiDebugToolbarRoute.php
YiiDebugViewHelper.php
YiiDebugViewRenderer.php
composer.json

README.markdown

Yii Debug Toolbar

The Yii Debug Toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel's content.

It is a ported to PHP famous Django Debug Toolbar.

Currently, the following panels have been written and are working:

  • Server info
  • Request timer
  • A list of superglobals
  • Application settings
  • SQL queries including time to execute and param bindings
  • Cache requests including time
  • Logging output via Yii built-in logging

Installation

Extract the yii-debug-toolbar from archive under protected/extensions

Usage and Configuration

For use yii-debug-toolbar need to specify new route in log component:

<?php
//...
    'log'=>array(
        'class'=>'CLogRouter',
        'routes'=>array(
            array(
                'class'=>'ext.yii-debug-toolbar.YiiDebugToolbarRoute',
                // Access is restricted by default to the localhost
                //'ipFilters'=>array('127.0.0.1','192.168.1.*', 88.23.23.0/24),
            ),
        ),
    ),
  • Make sure your IP is listed in the ipFilters setting. If you are working locally this option not required.
  • Enable Profiling and ParamLogging for all used DB connections.
<?php
//...
    'db'=>array(
        'connectionString' => 'mysql:host=localhost;dbname=test',
        //...
        'enableProfiling'=>true,
        'enableParamLogging'=>true,
    ),
  • To enable reports about cache usage you need to change application configuration like that
<?php
//...
    'cache'=>array(
        'class' => 'ext.yii-debug-toolbar.YiiDebugCacheProxy',
        'enableProfiling' => true,
        'cache' => array(
            'class' => 'system.caching.CFileCache', // or other cache class
            //... any other valid settings for cache
        ),
    ),

TODOs and BUGS

See: issues

Working preview

Screenshot1 Screenshot2 Screenshot3 Screenshot4 Screenshot5

Something went wrong with that request. Please try again.