Support » Fixing WordPress » WP_DEBUG not showing errors

  • I have a chunk of code that I’ve been told is throwing some errors but they’re not being displayed.

    define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true);

    The debug log is showing the errors, however.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Try moving those lines to the top of your wp-config.php file.

    define('WP_DEBUG_DISPLAY', true);
    Thread Starter gstricklind

    (@gstricklind)

    Thanks. Added the WP_DEBUG_DISPLAY and moved them to the top. Still nothing showing.

    Thread Starter gstricklind

    (@gstricklind)

    Just tried this: if I test something that will give me an error outside of this:

    class kedc_mini_sitemap extends WP_Widget { ... }

    I get the error displayed. but any errors inside “extends WP_Widget { … }” will not display.

    I don’t have define('WP_DEBUG_DISPLAY', true); set up yet my errors seem to display just fine. what kind of errors are you seeing in the log file? I wonder if they are happening just a little too early for the display to catch them?

    Thread Starter gstricklind

    (@gstricklind)

    It’s just a PHP Notice: Undefined index happening around line 125 in my functions.php for a custom theme I’ve been working on. If I recreate this error outside and above the custom widget function though, it gets displayed.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP_DEBUG not showing errors’ is closed to new replies.