-
Notifications
You must be signed in to change notification settings - Fork 968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to activate debug mode via cli argument? #177
Comments
I was able to accomplish this by adding the following to my wp-config.php define('WP_DEBUG', defined('WP_CLI') && WP_CLI && array_key_exists('debug', $assoc_args) && $assoc_args['debug']); Would it make sense to make this default behaviour? ( is it even possible? ) |
Well, wp-cli could set WP_DEBUG before loading WP, but you'd then get an error if you had already defined WP_DEBUG inside wp-config.php. |
PS: Accessing |
If $assoc_args goes away, will you provide another way to access the arguments? |
Probably. |
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. Built from https://develop.svn.wordpress.org/trunk@37626 git-svn-id: http://core.svn.wordpress.org/trunk@37594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. Built from https://develop.svn.wordpress.org/trunk@37626 git-svn-id: http://core.svn.wordpress.org/trunk@37594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. Built from https://develop.svn.wordpress.org/trunk@37626
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. git-svn-id: https://develop.svn.wordpress.org@37626 602fd350-edb4-49c9-b593-d223f7449a82
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. git-svn-id: https://develop.svn.wordpress.org/trunk@37626 602fd350-edb4-49c9-b593-d223f7449a82
It would be helpful for me to be able to run certain commands with WP_DEBUG = true.
Is it possible to activate debug mode from command line? something like
wp --debug post create
The text was updated successfully, but these errors were encountered: