Header Ads

How to enable developer mode in Magento 2

How to enable developer mode in Magento 2

How to enable developer mode in Magento 2



1, Enable php log error


Go to file: /app/bootstrap.php

Uncommnet line: #ini_set('display_errors', 1); to ini_set('display_errors', 1);

How to enable developer mode in Magento 2


2, Enable path hint


2.1 Enable in admin page:


Store > Configuration > Advanced > Developer 

Enable path hint to choose YES:

How to enable developer mode in Magento 2

2.2 Enable path hint by Magento CLI:


php bin/magento dev:template-hints:enable

3, Enable magento2 developer mode


When you enable magento developer mode, if you change code in site you don't need run deploy static content. Because magento auto generate static content for you :D

- Check mode in magento2:

php bin/magento deploy:mode:show

- Change to magento2 developer mode

php bin/magento deploy:mode:set developer

- Magento2 deploy content:

php bin/magento setup:static-content:deploy


4, Show log, error in the page Magento


You can change the file name: /pub/errors/local.xml.sample to /pub/errors/local.xml

How to enable developer mode in Magento 2


Done !!

Thanks!!



No comments