yong/magento2debugbar

PHPDebugbar for Magento2

安装: 20

依赖: 0

建议: 0

安全: 0

星标: 4

关注者: 3

分支: 4

开放问题: 0

类型:magento2-module

dev-master / 2.0.0.x-dev 2017-07-31 08:04 UTC

This package is not auto-updated.

Last update: 2024-09-23 07:09:29 UTC


README

Total Downloads Latest Stable Version Latest Unstable Version License

这是一个将PHP Debug Bar与Magento 2集成的包。

它轻量级地动态注入并收集开发/生产模式下的调试信息。您可以通过特定的IP地址或匹配的特定cookie名称和值来配置启用它,并且可以通过您自定义的访问控制函数来扩展它。

它启动了一些收集器与Magento2一起工作,并实现了几个自定义数据收集器,专门针对Magento2。它配置为显示重定向和(jQuery)Ajax请求。(显示在下拉菜单中)阅读文档获取更多配置选项。

此包包含一些自定义收集器

  • QueryCollector:显示查询,包括绑定和计时
  • ControllerCollector:显示关于当前/重定向路由操作的详细信息。
  • TemplateCollector:显示当前加载的模板文件。
  • ModelCollector:显示加载的模型
  • ProfileCollector:显示Magento2分析器详细信息
  • RequestCollector:通过PHPDebugbar的默认RequestCollector
  • MemoryCollector:通过PHPDebugbar的默认MemoryCollector
  • MessagesCollector:通过PHPDebugbar的默认MessagesCollector

并且它还替换了Magento默认的异常处理程序,作为Whoops Error Handler。阅读filp/whoops获取更多详情。

它还提供了配置接口,以便轻松动态扩展您的功能。

安装

使用composer安装此包

composer require yong/magento2debugbar dev-master

更新composer后,将'phpdebugbar'配置添加到app/etc/env.php

  'phpdebugbar' =>
  array (
    'enabled' => 1,
    'enable_checker' =>
    array (
      'cookie' =>
      array(
        'name' => 'php_debugbar',
        'value' => 'cookievalue'
      ),
    ),
  )

然后运行

bin/magento module:enable Yong_Magento2DebugBar

使用方法

启用/禁用:转到文件app/etc/env.php,将phpdebugbar数组中的'enabled'设置为0以禁用,设置为1以启用(但仍需检查cookie对)

enable_checker:当phpdebugbar启用时,它将进行进一步检查,您需要在app/etc/env.php中设置您的cookie对,并且您的浏览器也有相同的cookie对。然后phpdebugbar将被启动。否则它将不会启动,并且不会收集任何东西,它不会影响性能。因此,您可以在生产环境中部署它。

许可证

当然

MIT: http://rem.mit-license.org

Screenshot Screenshot Screenshot Screenshot