crisu83/yii-debug

Debugging tools for the Yii PHP framework.

Installs: 9 333

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 3

Type:yii-extension

dev-master 2013-06-27 20:32 UTC

This package is auto-updated.

Last update: 2024-10-29 04:30:51 UTC


README

Debugging tools for the Yii PHP framework.

Configuration

Add the debug command to your console config file (usually 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

Update your entry script (usually index.php) to use the Debugger:

$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

Usage

To enable debugging with the following command:

yiic debug on

You can also enable debugging for a specific ip address (replace {ip-address} with the desired ip address):

yiic debug on {ip-address}

To turn of debugging mode, simply run the following command:

yiic debug off