Coder Social home page Coder Social logo

yongchengchen / magento2debugbar Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 4.0 46 KB

This is a package to integrate PHP Debug Bar with Magento 2. It lightly dynamic inject and collect debug info for Magento2 for development/production mode. You can configure enable it by specific IP address or specific cookie name and value matched, and you can extend it by your custom access control functions.

Home Page: http://zencodelife.me/article/magento/magento2debugbar.md

PHP 100.00%
magento phpdebugbar collector screenshot whoops composer

magento2debugbar's Introduction

Magento2 Debugbar

Total Downloads Latest Stable Version Latest Unstable Version License

This is a package to integrate PHP Debug Bar with Magento 2.

It lightly dynamic inject and collect debug info for Magento2 for development/production mode. You can configure enable it by specific IP address or specific cookie name and value matched, and you can extend it by your custom access control functions.

It bootstraps some Collectors to work with Magento2 and implements a couple custom DataCollectors, specific for Magento2. It is configured to display Redirects and (jQuery) Ajax Requests. (Shown in a dropdown) Read the documentation for more configuration options.

This package includes some custom collectors:

  • QueryCollector: Show queries, including binding + timing
  • ControllerCollector: Show information about the current/redirect Route Action.
  • TemplateCollector: Show the currently loaded template files.
  • ModelCollector: Show the loaded Models
  • ProfileCollector: Shows the Magento2 profiler details
  • RequestCollector: The default RequestCollector via PHPDebugbar
  • MemoryCollector: The default MemoryCollector via PHPDebugbar
  • MessagesCollector: The default MessagesCollector via PHPDebugbar

And it also replace Magento default exception handler as Whoops Error Handler.Read filp/whoops for more details.

It also provides config interface for easy dynamic extend your functionality.

Installation

Require this package with composer:

composer require yong/magento2debugbar dev-master

After updating composer, add 'phpdebugbar' configuration to app/etc/env.php

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

and then run

bin/magento module:enable Yong_Magento2DebugBar

Usage

Enable/Disable: go to file app/etc/env.php, set 'enabled' of array phpdebugbar as 0 for disable, 1 for enable(but still need cookie pair check)

enable_checker: When phpdebugbar is enabled, it will do further check, you need to set your cookie pair in app/etc/env.php, and also your browser has the same cookie pair. Then phpdebugbar will be launched. Otherwise it will not be launched and will collect nothing, it will not affect the performance. So you can deploy it on your production environment.

License

And of course:

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

Screenshot Screenshot Screenshot Screenshot

magento2debugbar's People

Contributors

yongchengchen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.