When you are writing some plugins and themes for WordPress, and finding it hard to debug because somehow by the time the page has loaded, $_GET, $_POST and $_REQUEST are all empty. Even with error reporting set on, You have not getting error messages either other than a blank page whenever there is a fatal error.
So we find out that Is there anyway to enable a ‘debug mode’ for WordPress?

Yes Of course, there is some setting in wordpress where we can enable a debug code. This setting are available in wp config file in root folder of WordPress application.

You can also use the built-in WordPress PHP debugging functions in wp-config.php , i.e.:

// Enable WP_DEBUG mode
define(‘WP_DEBUG’, true);

// Enable Debug logging to the /wp-content/debug.log file
define(‘WP_DEBUG_LOG’, true);

// Disable display of errors and warnings
define(‘WP_DEBUG_DISPLAY’, false);
@ini_set(‘display_errors’,0);

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define(‘SCRIPT_DEBUG’, true);

For more details https://codex.wordpress.org/Debugging_in_WordPress for the complete docs