Prestashop logo, Visit home page

Debug Mode

-

For your own needs, or at the request of our support teams, you may need to activate the debug mode. There are two ways to activate this mode.

 

Via the back office

The most direct solution is to use your store's back office, if you still have access to it of course. Once this mode is activated, error indicators will appear at the bottom of the page.

To access: Advanced settings > Performance > Debug mode > Yes > Save

 

To deactivate debug mode, simply click on the insect icon at the top of the page, set the button back to No, and save.

 

💡 Please note: this type of debug mode can cause error messages to appear on your store's front office, visible to any user. To prevent this from happening, you can put your store in maintenance mode, or set debug mode via FTP, in your store files.

 

Via the FTP

To enter debug mode from your files, go to FTP and find the following lines in the /config/defines.inc.php file:

/* Debug only */
if (!defined('_PS_MODE_DEV_')) {
	define('_PS_MODE_DEV_', false);
}

To activate simple debug mode, simply replace the "false" value with "true". This is the same type of debug mode as the one available on back office.

/* Debug only */
if (!defined('_PS_MODE_DEV_')) {
	define('_PS_MODE_DEV_', true);
}

To avoid error messages appearing on your front office, choose a debug mode based on your IP address. This way, error messages won't be visible to any user on your store.

/* Debug only */
if (!defined('_PS_MODE_DEV_')) {
	define('_PS_MODE_DEV_', $_SERVER['REMOTE_ADDR']
== "YOUR IP" || $_SERVER['HTTP_X_REAL_IP'] == "YOUR IP"); }

 

Any modification to your store files can lead to irreversible errors. Don't forget to make regular backups, and if you have the slightest doubt, don't tamper with your files yourself.

 

 

Share

Was the article helpful?