query-monitor
query-monitor copied to clipboard
WP_Error tracker
This introduces a new panel which allows you to track the journey that a WP_Error object takes through the code.
Requires WordPress 5.6 (see https://core.trac.wordpress.org/ticket/40568).
The instantiation of the error is tracked (specifically, the addition of an error to a WP_Error object is tracked) and then any subsequent calls to is_wp_error() where that error object is passed through it.
I'm unsure if this panel is widely useful, but I have found it to be useful if a WP_Error instance "disappears" by, for example, being checked and then turned into return false. This panel allows for part of that investigation to be provided for you as you can see the journey that the error took until it disappeared.
This usage pattern of course shouldn't be encouraged, but it's what we have. Use exceptions!
The filtered stack trace is currently quite unreliable. I need to continue working on improvements to the filtering inside QM_Backtrace.
