WordPress errors localized to page you’re on

Typically errors are turned on or hidden globally in the the wp configuration file. There are times when something isn’t working and I just want to quickly debug within that page. By wrapping the code below in a simple function it becomes pretty easy to do this.

No you needn’t either go review a log file that likely has other stuff on it and is, therefore, confusing nor do you have to go to wp-config.php and potentially cause there to be visible errors displayed across an entire site.

I have a few dozen of functions similar to this I keep in a global plugin for easy access.