# How to enable debug mode on PrestaShop

> Debug mode replaces PrestaShop's blank page or generic message with the exact technical detail of the error: file, line, class at fault. It's the first thing to enable when facing a problem that doesn't explain itself.

- Source canonique : [https://allaux.fr/en/guides/activer-mode-debug-prestashop](https://allaux.fr/en/guides/activer-mode-debug-prestashop)
- Langue : EN
- Dernière mise à jour : 2026-09-30

## Direct answer

> Open config/defines.inc.php at the root of PrestaShop and set the _PS_MODE_DEV_ constant to true, then reload the page showing the error: the full technical message replaces the blank screen. Set it back to false as soon as the diagnosis is done, and never leave it on in production otherwise.

## Enabling then disabling debug mode

1. **Connect via FTP, SFTP or SSH** — The file to edit isn't reachable from the back office or the admin: you need access to the server's files.
2. **Open config/defines.inc.php** — This file sits at the root of the config/ folder in the PrestaShop installation, regardless of version 1.6, 1.7, 8 or 9.
3. **Edit the _PS_MODE_DEV_ constant** — Find the line define('_PS_MODE_DEV_', false); and replace false with true, then save the file.
4. **Reload the page in question** — On PrestaShop 1.7 and later, a Symfony debug bar appears at the bottom of the page with the SQL queries executed, the load time, and the full error stack if an exception was thrown.
5. **Read the message and trace it back to the cause** — The message shows the file, the line, and often the class or module at fault. That's the text to search for or pass along for a precise diagnosis.
6. **Set the constant back to false** — Once the cause is identified and fixed, set _PS_MODE_DEV_ back to false immediately. Leaving it on exposes technical details, and sometimes data, to any visitor.

## config/defines.inc.php

```
define('_PS_MODE_DEV_', true);
```

## What debug mode actually changes

Without debug mode, PrestaShop intercepts PHP and Smarty errors and shows a generic page or a blank screen instead, so nothing sensitive is exposed to a visitor. That's a useful safeguard in production, but it also prevents seeing what actually happened.

With debug mode enabled, the behaviour differs by version. On PrestaShop 1.6, standard PHP errors and Smarty compilation errors display directly on the page. On PrestaShop 1.7, 8 and 9, which run on the Symfony framework, dev mode also enables the Symfony debug bar (Symfony profiler) at the bottom of every page: it lists the SQL queries executed, their execution time, memory consumed, and, in the event of an exception, the full call stack with the exact file and line.

Debug mode also affects caching behaviour: in development, PrestaShop recompiles Smarty templates and reloads the configuration on every request rather than serving a compiled version. That's slower, which is another reason never to leave it on permanently.

## Common mistakes

- Forgetting to set _PS_MODE_DEV_ back to false after diagnosing: the site then exposes technical information, and sometimes configuration data, to every visitor.
- Trying to edit the file through the back office's built-in code editor when the back office itself is unreachable: in that case, only direct file access works.
- Confusing PrestaShop's debug mode with the server's PHP debug mode (display_errors): both are useful but show different things and are set in different places.
- Enabling debug mode on a store whose SSL certificate is still showing warnings: the revealed technical page could then be visible in plain text on an unsecured network.

## FAQ

### Can debug mode break anything on the store?

No, it doesn't modify any data. It only changes how PrestaShop displays errors and, on 1.7 and later, disables certain development caches, which temporarily slows the site down without damaging it.

### I don't have FTP access, what should I do?

You need at least access to the server's files, via FTP, SFTP, SSH, or the hosting panel's file manager. Without that access, it isn't possible to edit config/defines.inc.php.

### Debug mode is enabled but the screen is still blank, why?

This happens when the error occurs even before PrestaShop finishes loading, for example a low-level fatal PHP error or an invalid .htaccess file. In that case, check the server logs directly.

### Should debug mode be enabled site-wide or just on one page?

The constant applies to the whole site; there's no per-page setting. That's exactly why it should stay enabled for as little time as possible.

### The error message shown contains sensitive information, is that a problem?

The risk is real if the mode stays on for long: file paths, database structure, or SQL queries can appear. Fixing it quickly and switching back to production mode limits that risk to the duration of the diagnosis.
