Skip to content

Commit 4200ed8

Browse files
committed
Update Readme.md
1 parent 91ef146 commit 4200ed8

18 files changed

+53
-22
lines changed

Readme.md

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
# Magento 2 - Debug module
22
Module for debugging Magento 2 performance. It works without overwriting any core files and it can be installed with composer.
33

4+
![toolbar](./view/base/web/images/readme/homepage.png)
5+
6+
7+
#### The module supports Hyva Theme!
8+
9+
<img alt="hyva" height="135" width="300" src="./view/base/web/images/readme/hyva.png"/>
10+
11+
12+
#### Important - the module is not intended to work in a production environment!
413
## Installation
514
1. Enable developer mode `php bin/magento deploy:mode:set developer`
6-
2. Register git repository `composer config repositories.dbg git https://github.com/daseraf/magento2-debug.git`
7-
3. Install module via composer `composer require daseraf/magento2-debug [--update-no-dev]`
8-
4. Register module `php bin/magento setup:upgrade`
9-
5. Enable profiler in configuration: `Stores -> Configuration -> Advanced -> Debug`
10-
6. Clear cache `php bin/magento c:c`
15+
2. Install module via composer `composer require daseraf/magento2-debug`
16+
3. Register module `php bin/magento setup:upgrade`
17+
4. Enable profiler in configuration: `Stores -> Configuration -> Advanced -> Debug`
18+
5. Clear cache `php bin/magento c:c`
19+
20+
# If you want to see Callmap
21+
For this functionality you will need to install the xhprof extension for your PHP interpreter
22+
I recommend using PECL for these purposes.
23+
https://pecl.php.net/package/xhprof
1124

1225
## Enable Callmap collector
1326
> pecl install xhprof
@@ -18,32 +31,50 @@ Just enable extension:
1831
Xhprof flags are set from the Magento admin panel
1932
> Advanced -> Debug -> Data collectors -> Xhprof Flags
2033
21-
## Configuration
22-
All settings have only default scope and config type pool is set to environment for better integration with `php bin/magento app:config:dump`
34+
# If you want to monitor queries to the database, run this command
35+
> php bin/magento debug:db-profiler:enable
36+
37+
This will add a profiler flag to the database section of the env.php file
38+
39+
## To disable use the following command:
40+
> php bin/magento debug:db-profiler:disable
2341
2442
## Compatibility
2543
* Magento 2.2 - 2.4
2644
* PHP 7.0 - 8.1
2745

2846
## Profiler collectors
29-
- Ajax
30-
- Cache
47+
- Ajax - Please note that you can profile any requests coming into the platform, such as adding to cart
48+
![ajax](./view/base/web/images/readme/ajax.png)
49+
- Call map - Shows the time spent performing each function. [XHprof extension required](https://www.php.net/manual/en/book.xhprof.php)
50+
![callmap-main](./view/base/web/images/readme/callmap-main.png)
51+
![callmap-popup](./view/base/web/images/readme/callmap-popup.png)
52+
- Database - Database queries and variable values
53+
![database](./view/base/web/images/readme/database.png)
54+
- Events - Displays all sent events as well as the observers tracking them
55+
![events](./view/base/web/images/readme/events.png)
56+
- Layout - Displays a list of blocks and the time spent on rendering them
57+
![layout-render](./view/base/web/images/readme/layout-render.png)
58+
- Layout Rendering analysis (Layout tab) - Detailed information on each block and caching status for them.
59+
![layout-block-cache.png](./view/base/web/images/readme/layout-block-cache.png)
60+
#### Attention - if you see that blocks are not cached, this is not a debugger error! Please make sure your block has cache_lifetime.
61+
- Models - Displays loaded entity modules and the number of reloads without accessing the cache
62+
![models](./view/base/web/images/readme/models.png)
63+
- Plugins - Shows the plugins that were called during the process, as well as the time spent on their work. Attention - the execution time of around plugins includes the execution time of all functions that will be called in the body of the plugin. Is not an error
64+
![plugins](./view/base/web/images/readme/plugins.png)
65+
- Translations - here you can see all messages for which translation is missing
66+
![translation](./view/base/web/images/readme/translation.png)
67+
- Cache (Status and Calls) - This tab displays all successful cache calls (cacheKey is displayed in the table)
68+
![cache](./view/base/web/images/readme/cache.png)
69+
- Performance - here you can find a graph that is based on the output of the standard profiler from magento
70+
![performance](./view/base/web/images/readme/performance.png)
71+
- Request/Response
72+
![request](./view/base/web/images/readme/request.png)
3173
- Config
32-
- Customer
33-
- Database
34-
- Events
35-
- Layout
74+
![config](./view/base/web/images/readme/config.png)
3675
- Memory
37-
- Models
38-
- Plugins
39-
- Request/Response
40-
- Performance
41-
- Translations
42-
- Call map - [XHprof extension required](https://www.php.net/manual/en/book.xhprof.php)
76+
![memory](./view/base/web/images/readme/memory.png)
4377

44-
## For logging plugin performance setup this patch:
45-
https://github.com/Daseraf/magento2-debug/blob/master/core_patches/module-framwork.diff
46-
4778
## Additional features
4879
- [Whoops error handler](http://filp.github.io/whoops/)
4980

view/base/web/images/readme/ajax.png

407 KB
Loading

view/base/web/images/readme/cache.png

262 KB
Loading
317 KB
Loading
321 KB
Loading
236 KB
Loading
243 KB
Loading
271 KB
Loading
947 KB
Loading

view/base/web/images/readme/hyva.png

13.2 KB
Loading
Loading
240 KB
Loading
223 KB
Loading
287 KB
Loading
264 KB
Loading
310 KB
Loading
226 KB
Loading
237 KB
Loading

0 commit comments

Comments
 (0)