yiidebugtb Yii Debug Toolbar

  1. Documentation
  2. Change Log

This extension is very useful in the development stage of project. It helps you to get info about PHP environment, application, queries logs, benchmarking with a simple little toolbar at the top of the page.

It is a recreated Symfony's developer toolbar. First idea and very first implementation was my, but this version mostly implemented by Eduard Kuleshov.

This version tested for 1.0.x branch of Yii Framework.

Last update gives additional security option. If you worry about this please download last version. (Check the README file for details)

Working for 1.1.x branch and PHP 5.3 also is good.

Resources

NOTE: Project Home Page changed from Google Code to the GitHub.com

Documentation

Requirements
  • Yii 1.0 or above
Installation
  • Extract the release file under protected/extensions
Usage

main.php configuration file update:

[...]
  // autoloading model and component classes
  'import'=>array(
    'application.models.*',
    'application.components.*',
    'application.extensions.yiidebugtb.*', //our extension
  ),
  [...]
  'log'=>array(
    'class'=>'CLogRouter',
      'routes'=>array(
        array(
          'class'=>'CFileLogRoute',
          'levels'=>'error, warning, trace',
        ),
        array( // configuration for the toolbar
          'class'=>'XWebDebugRouter',
          'config'=>'alignLeft, opaque, runInDebug, fixedPos, collapsed, yamlStyle',
          'levels'=>'error, warning, trace, profile, info',
          'allowedIPs'=>array('127.0.0.1','::1','192.168.1.54','192\.168\.1[0-5]\.[0-9]{3}'),
        ),
      ),
  ),
  [...]

Options are:

  • 'alignLeft' => Debug toolbar will be aligned to the top left corner of browser window
  • 'opaque' => Makes debug toolbar almost invisible when it's minimized
  • 'runInDebug' => Show debug toolbar only if Yii application running in DEBUG MODE (see index.php for details)
  • 'fixedPos' => Makes debug toolbar sticky with browser window, not document!
  • 'collapsed' => Show debug toolbar minimized by default.
  • 'yamlStyle' => Show configuration report in Yaml or PHP-array style.

Also there is an additional security feature you may need - 'allowedIPs' option. This option holds the array of IP addresses of all machines you need to use in development cycle. So if you forget to remove YII_DEBUG from bootstrap file for the production stage, your client don't see the toolbar anyway. By default (if you didn't define it) there is only one IP address in allowedIPs list - 127.0.0.1.

Now you can use regexp patterns in allowedIPs options section to describe which hosts able to view YiiDebugToolbar in a more flexible way. Here is the example which allow to show YiiDebugToolbar to whole bunch of computers in 192.168.10-15.* subnet: '192.168.1[0-5].[0-9]{3}'.

Change Log

January 25, 2011
  • Fixed 'pxt' in styles section of view file
  • Improved allowedIPs option section to use regexp pattern matching (thanks to canni - https://github.com/canni)
September 23, 2010
  • Fixed showing of traceback messages
August 18, 2010
  • Added 'allowedIPs' option to configuration file
March 18, 2010
March 15, 2010
February 25, 2010
  • Fixed minor bug with 'Post' and 'Get' arrays of request parameters
January 26, 2010
  • Fixed horizontal scroll, removed borders from yiidebugpanel, also fixed fonts for yiidebugpanel
January 22, 2010
  • Changed project home page from Google Code to Github.com
January 11, 2010
  • Updates and fixes for properly work for 1.1.x branch and PHP 5.3.
January 11, 2010
  • Initial release.
102 5
84 followers
7 609 downloads
Yii Version: 1.1
License: (not set)
Category: Logging
Tags: debug, log
Developed by: Sergey Kuznetsov
Created on: Jan 11, 2010
Last updated: 9 years ago

Downloads

show all

Related Extensions