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.
NOTE: Project Home Page changed from Google Code to the GitHub.com
protected/extensionsmain.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:
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}'.
Total 20 comments
Hi
This is an excellent extension (I've been using it since some time and it allows for efficient debugging).
I've just added the following piece of code in the processLogs method to disable the extension for CWebServiceAction as the extra data at the end of the webservice reply is not very appreciated by the client:
Hi,
I needed a config setting to allow the debug toolbar only for some developer users.
Here is my diff:
Regards,
Joachim
Thanks very much for this excellent extension!
Thanks for a great extension! Seems to me very useful would be a Boolean type switch (enabled => true,false) to turn off the extensions with a single command
Great extension! Thx! I used it in all my project.
Very handy for debugging Yii projects, thanks for sharing!
Someone else had problems with the toolbar after update Yii framework to v1.1.8?
Have found a small bug in sessionAsArray(). Described the bug in the extension thread in the forum
Yii Debug Toolbar
Of course not, but in development I make it a principle to always have valid output, it helps me find and trace errors.
oh come on! you are not going to use it in production, so who cares if it validates or not.
nice extension. thanks. ^_^
The only thing that I do not like about this extension is that it produces invalid (X)HTML code. (It simply appends <style>, <script>, etc. at places where they must not be, uses "(" in an id attribute, uses <center>, etc.) Maybe I can be bothered to fix all this at some point, but until then it screws up my HTML validator which keeps me from using it, as I cannot spot problems as easily then anymore.
Its my most favorite extension. If you like it, here is a potential discussion that might lead to its inclusion in Yii as core feature. Take some time to star it:
http://code.google.com/p/yii/issues/detail?id=2351
you must be a fool to vote against this one.
i'm gonna try this tomorrow morning for sure.
sounds like a great extension
Very handy! Keep up the good work!
Thanks for sharing, this extension is great !
Great extension, very very useful.
Excellent extension! Thanks for sharing!
Thank you for this very useful extension...
Every project that I begin to work on, starts by adding this extension
Leave a comment
Please login to leave your comment.