Debugbar by kevdev

Debugbar by kevdev
A small tool that will help you debug your site.

Main advantages:
- Light
- Relatively easy to install
- Changes only 3 files (header.php, loader.php, db.php)
- Very informative
- It works only if there is an active admin session
- Ability to switch between the last 10 requests

- The module was tested only on clean Opencart and OcStore 3rd version, there is no information about conflicts with templates, modules, etc. (but since there is not much code, there should not be any)
- Calculation of the execution time of requests in the database is not real, the difference in time before and after the start of the request is calculated.

- Longest - display of all requests in the database sorted by approximate execution time (I emphasize that it is precisely by approximate time, not exact time)
- Duplicates - collects all duplicate requests in the database
- Queries - display of all requests according to the actual order of execution, and with the display of traces
- Controllers - display of all controllers that participated in displaying the page
- Models - display of all models that participated in the display of the page
- Views - display of all templates that took part in displaying the page
- Languages - display of all localization files that took part in displaying the page
- Data - a complete array of data that was transferred to the final template

- I recommend starting with a backup of the system folder
- install the module through the admin panel
- update the modifiers
- open the system/framework.php file and enter some code:

First, we look for a term with the code:

$registry->set('log', $log)

And after it, write the following code:

if(file_exists(DIR_SYSTEM . 'library/debugbar.php')){ require_once(DIR_SYSTEM . 'library/debugbar.php'); $debugbar = new Debugbar($config); }else{ $debugbar = null; } $registry->set('debugbar', $debugbar);

Next, we look for a term with the code:

$db = new DB($config->get('db_engine'), $config->get('db_hostname'), $config->get('db_username'), $config->get('db_password'), $config->get('db_database'), $config->get('db_port'));

And replace it with:

$db = new DB($config->get('db_engine'), $config->get('db_hostname'), $config->get('db_username'), $config->get('db_password'), $config->get('db_database'), $config->get('db_port'), $debugbar);

And the last step, we are looking for a deadline:


And before it, write the following code:

if(!is_null($debugbar)){ $debugbar->end($registry); }

That's all! Another instruction would be in plugin archive.


  • Developed by OpenCart Community
  • Documentation Included



Last Update
5 Nov 2023

5 Nov 2023
Member since: 28 Mar 2023

View all extensions Get Support