Skip to content

Cleanup debug constants #312

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

Closed
wants to merge 2 commits into from
Closed

Conversation

stian-overasen
Copy link
Member

  • No need to repeat default values in production. (SCRIPT_DEBUG and WP_DEBUG_DISPLAY are false by default)
  • Disable SCRIPT_DEBUG and SAVEQUERIES by default for local and development. Having these switched on is a big performance impact and not useful in our daily development.

More on WP debugging: https://wordpress.org/support/article/debugging-in-wordpress/

define( 'WP_DEBUG', true );
define( 'SCRIPT_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this break the debug log implementation in application.php?

[1] https://github.com/DekodeInteraktiv/project-base/blob/main/config/application.php#L93

define( 'WP_DEBUG_DISPLAY', true );
# phpcs:ignore define( 'SCRIPT_DEBUG', true );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably add a small comment to explain how to add SCRIPT_DEBUG and SAVEQUERIES and why they are disabled by default.

@walbo walbo removed their request for review February 28, 2022 18:46
@stian-overasen
Copy link
Member Author

Closing this in favor of #375

@stian-overasen stian-overasen deleted the cleanup-debug-constants branch August 18, 2022 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants