Codex tools: Log in
WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the "debug" mode throughout WordPress. It is assumed to be false by default and is usually set to true in the wp-config.php file on development copies of WordPress.
For information on other debugging tools built into WordPress see Debugging_in_WordPress
define('WP_DEBUG', true); define('WP_DEBUG', false);
The WP_DEBUG option was added in WordPress Version 2.3.1.
Starting with WordPress version 2.3.2, database errors are printed only if WP_DEBUG is set to true. In earlier versions, database errors were always printed. (Database errors are handled by the wpdb class and are not affected by PHP's error settings.)
Starting with WordPress version 2.5, setting WP_DEBUG to true also raises the error reporting level to E_ALL and activates warnings when deprecated functions or files are used; otherwise, WordPress sets the error reporting level to E_ALL ^ E_NOTICE ^ E_USER_NOTICE.