How to debug techniques in Magento 2

Here the following steps that will show you how to Debug technique in Magento 2:

Step 1: Permit the developer mode

Step 2: Permit Magento error notifications

Step 3: Permit php display errors

Step 4: Path hint

Debug is very essential for developer. Today, I will explain you how to debug in Magento 2.

Permit the developer mode:

  • The first thing you should do is allow the developer mode. The command can save the run time so it automatically sends the JS / CSS file to the Pub / Fixed folder.
  • To permit the developer mode, please visit to ssh, magento 2 root folder and enter the command:

 php bin/magento deploy:mode:set developer

  • Or you can visit to .htaccess file and don’t use the developer command

Debug technique in Magento 2

Permit Magento error notifications

Debug technique in Magento 2

As you know, when Magento has bug, it will inform you at the screen. However, you should go to the file to read the error. To study it at the web page screen, please visit to the folder pub/errors and rename file local.xml.sample to local.xml

Permit php display errors

Debug technique in Magento 2

To permit php exhibit bugs, please go to file: app/bootstrap.php and un-comment the line ini_set:

Path hint

Debug technique in Magento 2

To permit the path hint, please visit to Store – Configuration and Advanced-Developer. In Debug, please select “Yes” and save configuration.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *