Skip to content

--debug should display info on what called the exit #6009

@kkmuffme

Description

@kkmuffme

Feature Request

Is your feature request about a new command, or a more general idea?

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions