Prestashop no errors / blank page

Harry M picture Harry M · Sep 24, 2010 · Viewed 43.1k times · Source

I'm developing a module in PHP for Prestashop and I'm having a tough time trying to debug code. Whenever something falls over it doesn't display errors, just a blank page - either on the front end where the module is hooked, or on the back end module page.

I'm trying to write in another class, or another function but it doesn't like it at all.

It's on a local dev server, PHP errors are on etc.

Can somebody tell me any other way to debug stuff instead of commenting out code? Or some way of getting error codes?

Thanks for your help in advance.

Answer

David Hancock picture David Hancock · Sep 24, 2010

Try opening config/config.inc.php and then change:

@ini_set('display_errors', 'off')

to

@ini_set('display_errors', 'on').


From PS 1.5+, you need to open config/defines.inc.php and change:

define('_PS_MODE_DEV_', false);

to

define('_PS_MODE_DEV_', true);