📜 ⬆️ ⬇️

CodeIgniter Debug Toolbar

CodeIgniter Debug Toolbar
Many have seen the developer toolbar for the Kohana framework (puffed out, in turn, with Symfony ), which was recently laid out on a habr. I really liked him - I wanted to fuck like that for myself.

Having conjured a little bit, it turned out something similar ...

Problems

There are some problems associated with insufficient standard Codeigniter functionality — for example, you had to expand the Benchmark and Log libraries — so if you reworked them for your project, you need to be very careful when installing — not to overwrite your files and finish off the functionality manually.
Unfortunately, due to the fact that it is impossible to modify a DB library - it is impossible to log the number of rows involved when querying the database.

Actually, it was done exclusively for personal needs. Yes, and I work with CI for less than a week (the last year more and more with C # on ASP.NET), so do not be angry if the toolbar is buggy and swearing.
')
Catch: CodeIgniter Developer Toolbar v0.1

Kohana module

Note: If you have xdebug installed, a beautifully colored dump will be displayed in the “vars & config” tab.

I will describe, perhaps, the installation process


1. Copy the contents of the 'application' folder into your application folder ( carefully! )
2. Copy the pictures from the 'images' folder somewhere in the web root, for example in / images (then you can configure the path to them in the config file)
3. Enable the hooks in the application / config / config.php config
4. Edit application / config / hooks.php - add:
$hook['display_override'] = array(
'class' => 'DebugToolbar',
'function' => 'render',
'filename' => 'DebugToolbar.php',
'filepath' => 'hooks'
);

5. Configure the toolbar using the application / config / debug_toolbar.php file

And this, write about errors - we will promptly correct ...

Source: https://habr.com/ru/post/55477/


All Articles