Troubleshooting
Temporarily enable PrestaShop debug mode
Debug mode helps you get the exact exception when PrestaShop hides the failure. It can show paths, queries and internal data to any visitor, and it also reduces performance, so you should preferably use it on a clone or temporarily restrict access.
In current versions, enable it from Advanced Parameters > Performance > Debug mode. Reproduce only the action that fails, keep the trace and disable it straight away.
If you cannot access the back office, make a copy of config/defines.inc.php and change:
define('_PS_MODE_DEV_', false);
To:
define('_PS_MODE_DEV_', true);
Do not edit other values or leave the mode on while you investigate. The trace shows the point where the failure happened, but on its own it does not prove which update, module or change caused it. Compare the time with the PrestaShop and PHP logs.
When you have finished, set _PS_MODE_DEV_ back to false, clear the cache if needed and check from another session that the error is no longer shown publicly. PrestaShop 9 also lets you manage this state with the official prestashop:debug command.
Do not confuse debug and profiler
_PS_MODE_DEV_ controls debug mode; _PS_DEBUG_PROFILING_ is a separate performance analysis option. Do not enable the profiler just to get an error, and do not leave query data visible to the public.
Changing the environment can regenerate caches and alter response times. If an issue disappears only in debug mode, also check the cache and the production environment configuration before you consider it solved. Keep the trace private and do not share screenshots with tokens, customer data or full queries.
You may also find useful
- "An error occurred while sending the message" in the PrestaShop contact form Diagnose the contact form rejection and fix an old override only when it does not send contactform's...
- 404 errors on static files slow down browsing Detect missing static resources that trigger PHP and use CPU, serve them as lightweight 404s and gui...
- Debug errors in Joomla Get Joomla's exact error with its named reporting levels, without using numeric masks that depend on...
- Debug errors in PHP applications or files Diagnose a blank screen or a 500 error by reproducing the failure and checking the most specific log...
Something wrong or out of date? Tell us and we will review it.