pendalff / yii-debug-toolbar
一组可配置的面板,用于显示当前请求/响应的各种调试信息。
dev-master
2014-07-20 13:44 UTC
This package is auto-updated.
Last update: 2024-09-07 05:12:56 UTC
README
Yii Debug Toolbar 是一组可配置的面板,用于显示当前请求/响应的各种调试信息。点击面板时,会显示更多关于面板内容的详细信息。
它是从 PHP 知名的 Django Debug Toolbar 端口移植而来。
目前,以下面板已被编写并正常运行:
- 服务器信息
- 请求计时器
- 超全局变量列表
- 应用程序设置
- SQL 查询,包括执行时间和参数绑定
- 缓存请求,包括时间
- 通过 Yii 内置日志记录的日志输出
安装
从“protected/extensions”下的存档中提取 yii-debug-toolbar
使用和配置
要使用 yii-debug-toolbar,需要在“log”组件中指定新的 route
<?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), ), ), ),
<?php //... 'db'=>array( 'connectionString' => 'mysql:host=localhost;dbname=test', //... 'enableProfiling'=>true, 'enableParamLogging'=>true, ),
- 要启用有关缓存使用的报告,您需要更改应用程序配置如下
<?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 和 BUGS
见:问题