# What is debug mode?

> Debug mode is a setting that replaces the generic error messages shown to visitors with the full technical detail: the file involved, the line number, the function at fault, sometimes the offending SQL query.

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

## A temporary diagnostic tool

On PrestaShop, this setting is controlled by the _PS_MODE_DEV_ constant in the config/defines.inc.php file. On WordPress, the equivalent is the WP_DEBUG constant defined in wp-config.php. In both cases, enabling it turns a vague error screen into a precise trace, essential for quickly locating the origin of a bug or a 500 error.

## A risk if left active permanently

The information shown in debug mode (server file paths, database structure, code excerpts) is valuable to a developer, but just as valuable to an attacker. Leaving this mode active on a live site needlessly exposes technical details to any visitor and amounts to an avoidable security flaw.

## Turn it off right after use

> Debug mode should only be enabled for the duration of the diagnosis, then switched off immediately. Leaving it permanently active on a publicly accessible site is poor security practice.

## FAQ

### How do you enable debug mode on PrestaShop?

By changing the _PS_MODE_DEV_ constant in the config/defines.inc.php file, then setting it back to false once the diagnosis is complete.

### How do you enable debug mode on WordPress?

By setting the WP_DEBUG constant to true in the wp-config.php file, optionally combined with WP_DEBUG_LOG to write errors to a file rather than displaying them on screen.

### Does debug mode slow down the site?

It can slightly increase response time, but its real risk isn't performance: it's exposing sensitive technical information if left active in production.
