Debugging does not work
-
I have added the following to my wp-config.php
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true );
However, debugging is not working at all.
If I generate an error in my plugin file like so:
trigger_error("Example error", E_USER_ERROR);
Then the whole wordpress (multisite) installation fails to load. I get a white screen with a 500 error in browser. No error message is displayed and also in my Nginx log the PHP error is not recorded.
If I generate a notice like so:
trigger_error("Example notice", E_USER_NOTICE);
WordPress loads but there is no debug message at the top of the page and no log file is created.
This problem is only isolated to WordPress. If I do the same in a stand alone PHP file in the WordPress directory but not executed as a plugin, instead loaded directly in browser, the error messages display properly and also are recorded in the Nginx log for the site. There is some issue isolated to WordPress displaying errors.
This is causing me major problems and I cannot find any info on it in Goolge.
Does anyone have any idea what is going on?
- The topic ‘Debugging does not work’ is closed to new replies.