定制 daseraf/magento2-debug 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

daseraf/magento2-debug

最新稳定版本:2.2.4.1

Composer 安装命令:

composer require daseraf/magento2-debug

包简介

Magento 2 debug module based on Magento 1 Profiler with some extra features.

README 文档

README

Module for debugging Magento 2 performance. It works without overwriting any core files and it can be installed with composer.

toolbar

The module supports Hyva Theme!

hyva

Important - the module is not intended to work in a production environment!

Installation

  1. Enable developer mode php bin/magento deploy:mode:set developer
  2. Install module via composer composer require daseraf/magento2-debug
  3. Register module php bin/magento setup:upgrade
  4. Enable profiler in configuration: Stores -> Configuration -> Advanced -> Debug
  5. Clear cache php bin/magento c:c

Important! If you use the interceptor generator from Creatuity, you need to additionally install this package - daseraf/magento2-debug-creatuity.

If you want to see Callmap

For this functionality you will need to install the xhprof extension for your PHP interpreter. I recommend using PECL for these purposes. https://pecl.php.net/package/xhprof

Enable Callmap collector

pecl install xhprof

Xhprof extension configuration

Just enable extension:

extension=xhprof.so

Xhprof flags are set from the Magento admin panel

Advanced -> Debug -> Data collectors -> Xhprof Flags

If you want to monitor queries to the database, run this command

php bin/magento debug:db-profiler:enable

This will add a profiler flag to the database section of the env.php file

To disable use the following command:

php bin/magento debug:db-profiler:disable

Compatibility

  • Magento 2.2 - 2.4
  • PHP 7.0 - 8.1

Profiler collectors

  • Ajax - Please note that you can profile any requests coming into the platform, such as adding to cart ajax
  • Call map - Shows the time spent performing each function. XHprof extension required callmap-main callmap-popup
  • Database - Database queries and variable values database
  • Events - Displays all sent events as well as the observers tracking them events
  • Layout - Displays a list of blocks and the time spent on rendering them layout-render
  • Layout Rendering analysis (Layout tab) - Detailed information on each block and caching status for them. layout-block-cache.png

Attention - if you see that blocks are not cached, this is not a debugger error! Please make sure your block has cache_lifetime.

  • Models - Displays loaded entity modules and the number of reloads without accessing the cache models
  • 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 plugins
  • Translations - here you can see all messages for which translation is missing translation
  • Cache (Status and Calls) - This tab displays all successful cache calls (cacheKey is displayed in the table) cache
  • Performance - here you can find a graph that is based on the output of the standard profiler from magento performance
  • Request/Response request
  • Config config
  • Memory memory

Additional features

Credits

统计信息

  • 总下载量: 51
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 1
  • Forks: 37
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2023-11-24