📜 ⬆️ ⬇️

Debug toolbar


Kohana Debug Toolbar

Debug Toolbar is a module for Kokhans that simplifies debugging applications written in this PHP framework. Due to various statistical and debug information, the development process becomes easier and more pleasant for the programmer.

Under the cat a brief installation guide, description of features and links to additional information.

')

Installation


It is assumed that Kohana is already installed.

Go to the official Kohana Debug Toolbar page and go to the " files " section. We download the archive with the latest version in the format you like.

Unpack the archive. Only one debug_toolbar folder will appear. We transfer it with all its contents to the Kohana modules folder. As a rule, it is called modules.

We find the images folder in the debug_toolbar and the contents of this folder are transferred to some folder available on the web.

Open the modules / debug_toolbar / config / debug_toolbar.php file. Register the path to the transferred contents of the images folder relative to the site domain ( $config['icon_path'] = 'path/to/images'; ). And also we check that the auto_render option is set to TRUE , otherwise, to display the toolbar on the page, we will have to write echo DebugToolbar::render(); .

Open the Kokhans configuration file (application / config / config.php). Turn on hooks ( $config['enable_hooks'] = TRUE; ) and add a module ( $config['modules'] = array(MODPATH.'debug_toolbar'); ).

Done! If everything is done correctly, then when entering any page on the site, the Debug Toolbar will be displayed at the top.


Opportunities


Kohana Debug Toolbar
On the left in the toolbar is the logo of Kokhana and the version of the framework used.
Next come the runtime and the amount of RAM consumed. When you click on any of these two items, a summary table of memory and time for each stage of the system operation (kernel load, initialization, etc.) appears.
The next item is sql queries. When clicked, it displays a table of all completed queries to the database with the time and number of returned results.
The last but one item on our list is “variables and configuration”. In general, everything is clear from the name: allows you to see the variables get, post, cookie, session and the entire configuration of Kohana.
Well, the last point - the log entry. Displays all entries in the log that were made at run time.

Ah, yes, there are two more buttons from the right edge: the first one moves the toolbar to the other edge of the browser window, and the other hides it from the screen.

You can independently test the toolbar on the demo page .


Links


- Download
- Project page on the Kokhans website
- Project wiki on Kokhana site
- Project page on the author’s site
- Demo page

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


All Articles