10

Please brief on the features of extension. Besides this, mention the installation process or the steps involved for enabling the module.

7 Answers 7

5

You can use build in Magento 2 features : logging, xdebug support, profiler, developer mode and enable template patch hints.

XDebug for Magento 2 tutorial

Enable developer mode

php bin/magento deploy:mode:set developer

Magento 2 Profiler

SetEnv MAGE_PROFILER "html"

Enable Magento 2 Template page hints - Stores -> Configuration -> Developer

3

The Z-Ray tool from Zend Server adds to your Magento instance a toolbar with powerful features for profiling your PHP files. Using the Magento2 Z-Ray plugin you can track heavy constructors, blocks rendering calls, behavior extension by plugins, number of observers listening to specific event and time on their execution.

Process of installation is described in article.

2

You can use XDebug for this purpose. But check the known issue with xdebug

If you use the optional PHP extension xdebug, you can encounter exceptions:

  1. During installation
  2. Accessing either the Magento Admin or storefront after a successful installation

Sample exception:

Fatal error: Maximum function nesting level of '100' reached, aborting!

To resolve this issue, you can:

  1. Disable the xdebug extension.
  2. Set the value of xdebug.max_nesting_level to a value of 200 or more. For more information, see xdebug documentation.

After you change the configuration of or disable xdebug, restart Apache:

CentOS: sudo service httpd restart Ubuntu: sudo service apache2 restart

1

I have released a developer debug toolbar for Magento 2 available on githug

Developement Toolbar for Magento 2

This toolbar allow you to access information about current loaded page in tabs:

  • Info : Information about controller, route, action and store. A dedicated tab output a phpinfo.
  • Design : List handles called and display layout structure of nested blocks and containers
  • Profile : View current observers, all events dispatched and collections, models loaded
  • Queries : Statistics about executed queries and detailed query listing with syntax highlighting of main SQL keywords
  • Logs : Display log files with ability to reset these files
  • Actions : Easily toggle template hints and inline translation and flush cache
1

I tested the best developer toolbars, I'll put down the more I liked it.

  1. ADM/QuickDevBar

Info : Information about controller, route, action and store. A dedicated tab output a phpinfo.

Design : List handles called and display layout structure of nested blocks and containers

Profile : View current observers, all events dispatched and collections, models loaded

Queries : Statistics about executed queries and detailed query listing with syntax highlighting of main SQL keywords

Logs : Display log files with ability to reset these files

Actions : Easily toggle template hints and inline translation and flush cache

  1. Mirasvit/Module-profiler

  2. Balloz/Magento2-developer-toolbar

1

It's not free ($99), but Commerce Bug has been useful to me as I've started to get into Magento.

https://store.pulsestorm.net/products/commerce-bug-3

1

I think, now it's quite good to use Blackfire or similar PHP-SPX with timeline view and some other metrics in addition to xDebug.

Timeline tells us a lot what going on under the hood.

https://webmageic.blogspot.com/2021/04/debug-magento-2-using-php-spx-profilers.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.