Debugging in WordPress

Debugging is the part of every programming language and every CMS of PHP. WordPress have specific debugging system with specific sets of Code.

WP_DEBUG

WP_DEBUG is part of wp-config.php file. You can set Boolean value for this. True to show errors and False to display off the errors.

define('WP_DEBUG', true);
define('WP_DEBUG', false);

WP_DEBUG_LOG

WP_DEBUG_LOG used to save all errors in debug.log file. It will be helpful when you want to review all errors after any particular time. So you have all errors in debug.log file.

define('WP_DEBUG_LOG', true);

SCRIPT_DEBUG

SCRIPT_DEBUG will force WordPress to use the “dev” versions of core CSS and Javascript files rather than the minified versions.

define('SCRIPT_DEBUG', true);

SAVEQUERIES

SAVEQUERIES saves the database queries to an array.

define('SAVEQUERIES', true);