PHPackages                             thepocket006/codeigniter-debugbar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. thepocket006/codeigniter-debugbar

ActiveCodeigniter-third-party[Debugging &amp; Profiling](/categories/debugging)

thepocket006/codeigniter-debugbar
=================================

CodeIgniter Debug Bar using PHP Debug Bar.

019PHP

Since Oct 12Pushed 3y agoCompare

[ Source](https://github.com/ThePocket006/codeigniter-debugbar)[ Packagist](https://packagist.org/packages/thepocket006/codeigniter-debugbar)[ RSS](/packages/thepocket006-codeigniter-debugbar/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Requirements
------------

[](#requirements)

- PHP 5.5+ (recommended by CodeIgniter)
- CodeIgniter 3.1.x

Installation
------------

[](#installation)

Create `composer.json` file in your application's root if there is none. Add the following text in the file:

```
{
    "require": {
        "thepocket006/codeigniter-debugbar": "dev-master"
    }
}
```

Enable Composer (locate in `application/config/config.php`) :

```
$config['composer_autoload'] = realpath(APPPATH.'../vendor/autoload.php');
```

Enable Debugbar package (locate in `application/config/autoload.php`) :

```
$autoload['packages'] = array(APPPATH.'third_party/codeigniter-debugbar');
```

if you want to log messages and exceptions you can also load console library

```
$autoload['libraries'] = array('console');
```

To use it.

```
$this->console->exception(new Exception('test exception'));
$this->console->debug('Debug message');
$this->console->info('Info message');
$this->console->warning('Warning message');
$this->console->error('Error message');
```

Then, enable the profiler like normal.

```
$this->output->enable_profiler(TRUE);
```

To complete the installation, add the following header tags :

```

```

Configuration
-------------

[](#configuration)

**Duplicate** configuration file located in `application/third_party/codeigniter-debugbar/config/profiler.php` to `application/config/profiler.php`.

To configure the profiler, read [CodeIgniter profiler documentation](http://www.codeigniter.com/userguide3/general/profiling.html).

CodeIgniter Debug Bar adds 4 new sections :

- CodeIgniter infos : Display informations about CodeIgniter (version, environment and locale).
- Messages : Display messages (Console library must be loaded).
- Exceptions : Display exceptions (Console library must be loaded).
- Included files : Display included or required files.

You can configure PHP Debug Bar directly into the profiler configuration file, read [PHP Debug Bar documentation](http://phpdebugbar.com/docs/rendering.html#rendering) for more information.

Advanced configuration
----------------------

[](#advanced-configuration)

### AJAX

[](#ajax)

By default ajax debug data are send through headers but if you are sending a lot of data it may cause problems with your browser. If you set `open_handler_url` in the configuration file, it will use a storage handler and the open handler to load the data after an ajax request.

Here is an example of an `open_handler_url` setting.

```
$config['open_handler_url'] = get_instance()->config->site_url('debug/open_handler');
```

This code will be in `application/controllers/Debug.php`

```
