Debugging in PHP
PHP debugging can be done using various techniques and it can save your countless hours while coding. One of the most basic debugging technique is to simply turn on error reporting, but it is very effective. Another technique is little more advanced involving print statements, which can help pinpoint more exclusive bugs by displaying what is actually going onto the screen.
In this blog we will learn about error reporting debugging technique which will help you in solving various WordPress related problems.
Activating the PHP’s DEBUG Mode
To activate the PHP’s DEBUG Mode open wp-config.php and look for the line:
What you need to do is to just add // before the line. (Technically we say that comment out the line)
Now your line looks as
// define(‘WP_DEBUG’, false);
Now what you need to add is
This will activate the information of PHP’s DEBUG. Now you won’t see “white screen” anymore. Now screen shows the errors in php code that are not allowing your website to work properly.