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.
// 2018-Dec-08 -- Quickly show errors function page_errors() { ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); }