How to enable PrestaShop debug mode on version 1.7 and older versions

PrestaShop is now one of the most popular e-commerce platforms. It has been helping over 270.000 merchants around the world achieve many sales goals. But what should you do when something is not right about your online store? In most cases, you will have to check the error itself by enabling the PrestaShop debug mode.

[toc]

In what cases you need to enable debug mode?

The debug mode is generally used to see the errors in your shop and when:

  • you get blank pages;
  • you get 500 Internal Server Error;
  • you have some strange issues with your shop and don’t know where to start.

Enable debug mode on PrestaShop 1.7

Automatically

Step 1: Login to your PrestaShop Dashboard. Select “Advanced Parameters” menu tab > “Performance”.

Step 2: In “Debug” block, set the “Debug mode” option to Yes. Save your settings.

There are also two other settings available:

  • Disable non PrestaShop modules: you can define whether the issue comes from the native PrestaShop code or thirty-party modules.
  • Disable all overrides: you can figure out if the error has been caused by native override or by a third-party override.

Manually

Step 1: Access your FTP server using some FTP-client software (Total Commander, FileZilla, etc.).

Step 2: Open your PrestaShop installation directory, go to the “config/defines.inc.php” file and open it with a text editor (Sublime Text, Notepad++, etc.).

Step 3: Find the following code (usually at line 29):

define(‘_PS_MODE_DEV_’, false);

Step 4: Change it to:

define(‘_PS_MODE_DEV_’, true);

Step 5: Save the changes and refresh the page you had issues on to see the correct error causing it.

 

Enable debug mode on PrestaShop 1.6

Enabling errors display

Step 1: You should turn on built-in debug mode by opening “config\defines.inc.php” file and locate the following line:

define(‘_PS_MODE_DEV_’, false);

Step 2: Change it to:

define(‘_PS_MODE_DEV_’, true);

Enabling errors logging

To log the errors without showing them, you need to open “index.php” file from the root of your PrestaShop installation and add the following code at the top:

Save the changes and refresh your website. You’ll see “errors.csv” file created on your server, it contains the log of the occurred errors.

Enable debug mode on PrestaShop 1.5.3 and older versions

For PrestaShop version 1.5.3 and below, you have to edit the “config/defines.inc.php” file and make the following changes:

Change the below line:

@ini_set(‘display_errors’, ‘off’);

into this:

@ini_set(‘display_errors’, ‘on’);

Remember to turn the debug mode off when finished debugging. Hackers may get advantage of it and they can harm your website. Moreover, any visible error is not good for visitors.

I hope that the above tutorial will be helpful for you to find out and fix any bug occurred on your PrestaShop store. If you have any question, don’t hesitate to leave a comment. I will try to answer as soon as possible.

The post How to enable PrestaShop debug mode on version 1.7 and older versions appeared first on Presta Hero.

Comments

Popular posts from this blog

PrestaShop error 500 – explained and how to troubleshoot

The Greatest Myth About Personalized Write Exposed

Ein einfacher Trick für Responsive Formgebung | Kostenlos Website Erstellen Mit Eigener Domain