Please brief on the features of extension. Besides this, mention the installation process or the steps involved for enabling the module.
7 Answers
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
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.
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:
- During installation
- 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:
- Disable the xdebug extension.
- 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
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
I tested the best developer toolbars, I'll put down the more I liked it.
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
It's not free ($99), but Commerce Bug has been useful to me as I've started to get into Magento.
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