crisu83 / yii-debug
为Yii PHP框架提供的调试工具。
dev-master
2013-06-27 20:32 UTC
This package is auto-updated.
Last update: 2024-08-29 04:08:21 UTC
README
为Yii PHP框架提供的调试工具。
配置
将调试命令添加到您的控制台配置文件中(通常为 protected/config/console.php)
// console application configuration return array( ..... 'commandMap' => array( 'debug' => array( 'class' => 'path.alias.to.DebugCommand', 'runtimePath' => 'application.runtime', // the path to the application runtime folder ), ), );
console.php
更新您的入口脚本(通常为 index.php)以使用调试器
$debugger = __DIR__ . '/path/to/Debugger.php'; $yii = __DIR__ . '/path/to/yii.php'; require_once($debugger); Debugger::init(__DIR__ . '/protected/runtime/debug'); require_once($yii);
index.php
用法
使用以下命令启用调试:
yiic debug on
您也可以为特定的IP地址启用调试(将 {ip-address}
替换为您想要的IP地址)
yiic debug on {ip-address}
要关闭调试模式,只需运行以下命令
yiic debug off