-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Feature Request
Is your feature request about a new command, or a more general idea?
- Yes, I reviewed the contribution guidelines.
Describe your use case and the problem you are facing
We recently encountered on a site where we suddenly got a non-descript error "Error:" (the message was translated since the site wasn't in English). Using --debug wasn't helpful, as the issue happened immediately and with any command that was run.
Turns out a plugin used on that site had a bug in a condition and executed WP_CLI::error( outside of any commands, halting all WP CLI execution. Finding what actually caused the issue was a major pain, since the error was only reproducible with a full database (since the bug in the condition was caused by an issue in user data).
Describe the solution you'd like
It would be great if --debug would actually output the file (maybe even a debug backtrace on exit) that triggers output from a specific WP CLI command like WP_CLI::error