yii-debug
Debugging tools for the Yii PHP framework., (*1)
Configuration
Add the debug command to your console config file (usually protected/config/console.php):, (*2)
// 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, (*3)
Update your entry script (usually index.php) to use the Debugger:, (*4)
$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, (*5)
Usage
To enable debugging with the following command:, (*6)
yiic debug on
You can also enable debugging for a specific ip address (replace {ip-address}
with the desired ip address):, (*7)
yiic debug on {ip-address}
To turn of debugging mode, simply run the following command:, (*8)
yiic debug off