How to enable developer mode or enable all error messages in magento 2

  • 5 years-11 months

    How to enable developer mode or enable all error messages in magento 2

    • Category : magento
    • Viewed : 31 times
    • Posted On :
    • Posted by : Vikas

    When you’re getting a blank page in Magento 2.x or only error number like Error log record number: (any number), you can enable error reporting in Magento.

    // enable error messages in command line
    php bin/magento deploy:mode:set developer
    
    // enable error messages in file
    Add following code in index.php file :-
    
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    
    // disable error messages in command line
    php bin/magento maintenance:disable
    Goto app/etc/ and open env.php
    and change current application mode by MAGE_MODE' => 'default' to MAGE_MODE' => 'developer'

    Then,please flush the cache

    you can give a try by renaming local.xml.sample to local.xml under pub/errors

Report this or Ask your own question

Your Answer

When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.