Jump to content
Daniel Patilea

How to enable debug mode on PrestaShop 1.7 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;

 

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

 

CwVlePh.png

 

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

 

 

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.

 

 

Edited by Daniel Patilea (see edit history)
  • Like 8
  • Thanks 2

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

ca reste le meme probleme le site est inaccessible du backoffice après l'installation

Share this post


Link to post
Share on other sites
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);
}

 

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

J'ai mal fait ce que j'ai dit, que faire s'il vous plaît

Capture.JPG

Share this post


Link to post
Share on other sites
Posted (edited)

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)

Share this post


Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More