Yii 1.1: yii-debug-toolbar

A configurable set of panels that display various debug information about the current request/response.

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:

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


  • JavaScript enabled browser
  • Yii 1.1.4 +


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:

  • 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.


Working preview

Screenshot 1

Screenshot 2

Screenshot 3

Change Log

December 10, 2013

* Updated design
* Fixed few bugs reported by users on GitHub issues page

November 28, 2011

* Added Views Rendering panel. It allows to view information about rendering process (view names, render methods, context objects and properties)
* Miscellaneous fixes

September 21, 2011

* Added SQL syntax highlighting
* Added highlighting of potentially inefficient queries 
* Miscellaneous fixes and UI enhancements

Juny 27, 2011

* Fixed PHP Error: `$_SESSION` variable is not defined

Juny 21, 2011

* Enhanced SQL log panel;
* Added new tab to SQL debug info with SQL servers info for all used connections;
* Added Yii debug status indicator to application settings panel;

Juny 20, 2011

* Initial release;

Total 20 comments

#19926 report it
petruza at 2016/08/11 11:24am
How to switch off toolbar in some cases, from code or config?

I'd like, for example, to not show the toolbar for Content-type: application/json responses. How would I do this?

#17805 report it
bandpay at 2014/07/24 07:31am
Question about config

Hi and thanks for a beautiful extension. This was good now it is also Beautiful :)

I just wanted to know if it is possible to select what I want to be tracked if it is Queries or Log and so forth.

Thanks again

#17804 report it
bandpay at 2014/07/24 06:27am

Very Beautiful.

I'm amazed

#17751 report it
romdoni at 2014/07/19 10:59am
not working

it not working for me, this my config

#16731 report it
yii at 2014/03/23 09:21am


#16715 report it
copist at 2014/03/22 12:16pm
New panel - cache usage

Cache usage panel shows settings, stats and callstack for cache component

Cache Callstack

Cache Callstack

Russian description of cache panel for yii-debug-panel

github.com: yii-debug-panel fork with cache panel

#16695 report it
1rhino at 2014/03/20 06:29am
Very fancy

Thank you. It's very fancy and useful! (y)

#16519 report it
Nabi at 2014/03/01 07:37pm
I develop the logging panel and add duration column with color mode for it.

I develop the logging panel and add duration column with color mode for it.

This is here: https://github.com/NabiKAZ/yii-debug-toolbar

Please review it and marge it on master project if you want.

#16510 report it
keripik_jagung at 2014/02/28 10:54pm

Very very nice!!!

#16270 report it
kuya1284 at 2014/02/04 06:48pm
Session woes part deux

My app continues to work fine when I disable the Session Attributes Request Panel. I'm baffled why this is happening. I even tried editing YiiDebugToolbarPanelRequest::run() as follows, but no dice:

public function run()
    if (session_id() !== '') {
        $this->render('request', array(
            'server' => $_SERVER,
            'cookies' => $_COOKIE,
            'session' => isset($_SESSION) ? $_SESSION : null,
            'post' => $_POST,
            'get' => $_GET,
            'files' => $_FILES,

So for now, I'm going to have to live without using the Session panel.

#16267 report it
kuya1284 at 2014/02/04 06:01pm
Session getting destroyed after redirects

I just updated to the latest version, and noticed that whenever I redirect, my session gets destroyed. When I disable the debugger, everything works fine.

I just wanted to give you a heads up and thank you for the nice update.

#16213 report it
Edgar Kuskov at 2014/01/30 06:38am
Blinking Panel

First thanks for the extension, is very useful. I have some kind of bug, when i hover elements in the opened panel, the sidebar is blinking (show/hide very fast). How can i fix that? Hover in SQL between Callstack and Server.

#16198 report it
beesho at 2014/01/27 12:35pm
Can't see the debug panels

I have installed the extension, but I can't see any debug panels.. Can anyone help please?

#14361 report it
kradam at 2013/08/06 08:41am
Broken code in <Download>


#13299 report it
kuya1284 at 2013/05/21 08:52am
AJAX response

The way I've dealt with AJAX in the past was by designing the app/api such that I could GET or POST using a generic form. In some cases, I've also used Firebug, which has a tab for viewing a rendered response.

#13287 report it
jneto at 2013/05/20 11:31pm
Ajax update

Is it possible to get the log from the ajax requests ?

#13254 report it
Ujjwal Prajapati at 2013/05/18 05:14am
Illegal String Offset

@m00nk ,

Did you find the solution to it? I am also having the same illegal offset error. Let me know.

#11942 report it
Edgar Kuskov at 2013/02/14 09:32am
Log execution time not run time

Is it possible to show the function execution time? I eam END-START= time? Because there is only the START time.

#11488 report it
zwobbel at 2013/01/16 10:35am
Thanks a lot!

Great work!

#11360 report it
kuya1284 at 2013/01/09 04:16am
Gateways, Load Balancers, Etc.

Here's another FYI for people still having problems. If you are having trouble with the ipFilters not working for you, it could be because your client/machine's IP Address isn't being detected. Instead, your Gateway, Load Balancer, or Proxy's IP Address may be getting filtered. To test this, try checking the return value of var_dump($_SERVER['REMOTE_ADDR']) and if the IP Address does not match your machine's IP Address, then that could be your problem.

This extension is setup to retrieve your IP Address using Yii::app()->request-getUserHostAddress(), which is most of the time the same as $_SERVER['REMOTE_ADDR']. The return value of $_SERVER['REMOTE_ADDR'] won't necessarily be your machine's IP. There are two ways in which I would deal with this. Either refactor YiiDebugToolbarRoute::init() or extend CHttpRequest and define your own getUserHostAddress().

Within either of the aforementioned methods, you may retrieve your real IP by using apache_request_headers() and parsing the X-Forwarded-For header. For example, you may add something like this:

$headers = apache_request_headers(); 
$ip = $headers['X-Forwarded-For'];
if (empty($ip))
    $ip = (isset($_SERVER['REMOTE_ADDR'])) ? $_SERVER['REMOTE_ADDR'] : '';

Please note that this may not always work. The apache_request_headers() function has always worked for me, and I have never ran into a situation (yet) where it hasn't.

Good luck.

Leave a comment

Please to leave your comment.

Create extension