Displaying PHP Errors from admin-ajax.php in Wordpress 4.9+
We've got some custom endpoints set up that do various things, which we access via
However whenever there is an error as we're developing, such as syntax, logical, fatal etc, we simply get "500 Internal Server Error" when viewing the page in the browser.
Every other page on the site when there's an error, it gives us the PHP error, to help us debug.
However when the error comes from the
admin-ajax.php area, we have to then open our PHP Log file to see the error instead - which is more of a pain when actively developing
Is there something in wordpress that disables displaying of errors on this URL namespace? and if so, how can we prevent this to allow rendering of the errors on the browser?