I am trying to create a debugging mode in one of my plugins so users can easily enable WP_DEBUG on their own, and hopefully report back to us with helpful error messages. Right now we ask them to modify their wp-config.php, but that's beyond some users' capabilities. I was hoping to just add
define( 'WP_DEBUG', true );in our plugin if the user has checked that option, but it appears you can only enable WP_DEBUG from the wp-config.php file.
Does anyone know of any way to enable WP_DEBUG from anywhere else but wp-config? Or is there another useful WP function that I could be using instead?