Jump to content

How to enable debug mode on PrestaShop 8.x - 1.7.x and older versions | Turn on error reporting | Blank page


Recommended Posts

The debug mode is widely used to see the errors on your shop and when:

 

  • you get blank pages;
  • you get 500 Internal Server Error;
  • you have strage issues with your shop and don't know where to start;

 

Edit:

Debug mode on PrestaShop 8.0

PrestaShop Dashboard > Advanced Parameters > Performance > DEBUG MODE PANEL > Set it to YES

 

Debug mode on PrestaShop 1.7

PrestaShop Dashboard > Advanced Parameters > Performance > DEBUG MODE PANEL > Set it to YES

To turn on the Debug mode on PrestaShop 1.7 is more simple comparing it to the previous versions of Prestashop.

You can do this from your PrestaShop Dashboard > Advanced Parameters > Performance > DEBUG MODE PANEL > Set it to YES

If you can't acces you dashboard you can also enable it through FTP by accessing config/defines.inc.php and usually @line  29 you will find:

define('_PS_MODE_DEV_', false);

change it to:

define('_PS_MODE_DEV_', true);

Turning on the Debug Mode on other versions of Prestashop

 

 

Debug mode on PrestaShop 1.5.3 to 1.6

For PrestaShop 1.5.3 to 1.6 the procedure is the same: 

 

Open config/defines.inc.php and usually @line 29 you will find :

define('_PS_MODE_DEV_', false);

change it to:

define('_PS_MODE_DEV_', true);
For PrestaShop below 1.5.3 you have to edit the config/defines.inc.php file and make the following changes:
 
Change this line:
@ini_set('display_errors', 'off');
to this:
@ini_set('display_errors', 'on');

!!! Be careful, turn the Debug Mode off when finished debugging, hackers may get advatage of it and may harm your website and besides of that any visible error is not good for visitors.

 

Because Debug mode should not be visible for your customers here's a smart solution that allows you to enable it only for admins or for some provided IPs. This way your shop will not be vulnerable while you debug.
 

 

Edited by Daniel Patilea
New version of PrestaShop (8.0) (see edit history)
  • Like 8
  • Thanks 4
Link to comment
Share on other sites

  • 2 years later...
  • 4 months later...
  • 3 weeks later...
On 6/12/2019 at 1:59 PM, Daniel Patilea said:

Usually the debug is displayed on your browser tab when there's an error. You can also view errors in error_log file from the root folder of your site.

 

On 6/12/2019 at 1:59 PM, Daniel Patilea said:

Usually the debug is displayed on your browser tab when there's an error. You can also view errors in error_log file from the root folder of your site.

Hi Daniel,

I've  changed config/defines.inc.php from false to true, however, I do not see any difference when I try to access my backoffice or web page. 

the only message that i receive is :

 

500 Server Error

Oops, something went wrong.

Try to refresh this page or feel free to contact us if the problem persists.

 

I´ve searched for the error_log inside the folder logs in filezilla, but there isn´t one

 

any idea on how can I have more info about this Error 500 ?

-----------------------------------------------------------

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

 

Link to comment
Share on other sites

On 11/19/2019 at 7:46 PM, Mexa Shop said:

 

Hi Daniel,

I've  changed config/defines.inc.php from false to true, however, I do not see any difference when I try to access my backoffice or web page. 

the only message that i receive is :

 

500 Server Error

Oops, something went wrong.

Try to refresh this page or feel free to contact us if the problem persists.

 

I´ve searched for the error_log inside the folder logs in filezilla, but there isn´t one

 

any idea on how can I have more info about this Error 500 ?

-----------------------------------------------------------

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

 

Check your files&folder permissions and also the .htaccess file.

Link to comment
Share on other sites

J'ai enclenché le mode débug car mon backoffice est extrêmement lent voir inutilisable parfois.

En mode débug, le backoffice est devenu inutilisable avec des message d'erreurs dans la plupart des catégories.
N'ayant pas accès au FTP ni au code, je suis dans l'impossibilité de désactiver le mode débug. Y a t'il une méthode pour revenir en arrière de puis le backoffice?

Merci!

Link to comment
Share on other sites

  • 5 months later...

PS debug mode is really useless....if error then one must turn it on and then recreate to get issue, and while on you expose errors to everyone.

we stopped counting on ps debug mode, we need to know errors before reporting from the field/customer.

we released our in-house module which we use on all dev/prod client shops
requires account with rollbar.com

PrestaShop Rollbar.com Integration Module

 

Edited by El Patron (see edit history)
Link to comment
Share on other sites

  • 6 months later...
  • 8 months later...
  • Daniel Patilea changed the title to How to enable debug mode on PrestaShop 8.x - 1.7.x and older versions | Turn on error reporting | Blank page

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...