For your own needs, or at the request of the 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 go through the back-office of your store, if you still have access to it, of course. Once this mode is activated, error indicators will appear at the bottom of the page, which will help you understand the problems encountered.
To access it: Advanced settings > Performance > Debug mode > Yes > Save
To deactivate the debug mode, you will then simply have to click on the insect icon at the top of the page, then put the button back in the No position, and save.
|
⚠️ Attention: this type of debug mode can display error messages on the front office of your store, visible to any user. To prevent this from happening, you can put your store in maintenance mode, or set up the debug mode via FTP, in the files of your store. |
Via FTP
To enter debug mode from your files, go to your 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 value "false" with "true". This is the same type of debug mode as the one available on the back office.
/* Debug only */
if (!defined('_PS_MODE_DEV_')) {
define('_PS_MODE_DEV_', true);
}
To prevent error messages from appearing on your front office, opt for a debug mode based on your IP address. In this way, the error messages will not be visible to any user on your store.
/* Debug only */
if (!defined('_PS_MODE_DEV_')) {
define('_PS_MODE_DEV_', $_SERVER['REMOTE_ADDR']
== "VOTRE IP" || $_SERVER['HTTP_X_REAL_IP'] == "VOTRE IP");
}
Any modification to your store files can lead to irreversible errors. Do not forget to make regular backups, and if you have any doubts, do not intervene on your files yourself, contact an agency or PrestaShop support.