[wp-trac] [WordPress Trac] #48720: Define all debugging constants for developers in wp-config.php
WordPress Trac
noreply at wordpress.org
Tue Nov 19 07:53:44 UTC 2019
#48720: Define all debugging constants for developers in wp-config.php
----------------------------+------------------------------
Reporter: davidnash | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: 5.3
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Comment (by wpgurudev):
Replying to [comment:3 SergeyBiryukov]:
> Hi there, welcome to WordPress Trac! Thanks for the ticket.
>
> Just noting that there was a previous discussion on this in #28551.
>
> Per nacin's comment in comment:30:ticket:28551:
> > My only other comment here still stands: I'm still not sure I'd
advocate for any changes here.
> >
> > I'd like to make sure we are adequately weighing two competing things:
> > 1. Giving more things users can either be confused about or possibly
do damage with. (For example, WP_DEBUG_LOG produces what would be a public
log file, SCRIPT_DEBUG can slow down their dashboard, and SAVEQUERIES can
slow down their site.)
> > 2. A developer saving a few precious seconds.
> >
> > At ''most'', I'd suggest we add a link to
http://codex.wordpress.org/Debugging_in_WordPress and close this out.
>
> The link was added in [32479] and changed to HelpHub in [32479].
I partially agree with this comment, but as a developer many times we are
in following situations:
1. We want to debug something and check debug log for it, we open wp-
config.php file and enable debug and debug log over there.
2. As a developer, we can investigate through debug log file and does not
necessarily need debug information to be displayed. Also it can break ajax
calls, so we generally keep it disabled.
3. Many times we may also need to debug the scripts while performing some
other debugging. So, SCRIPT_DEBUG is also useful when WP_DEBBUG is
enabled.
We can conditionally make `WP_DEBUG_LOG` and `SCRIPT_DEBUG` enabled if
`WP_DEBUG` is on. Since this is generally useful.
Also, `SAVEQUERIES` is not required always, so we can keep it up to
developers to add as we already have documentation link present in
docblock.
Adding the patch for suggestion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48720#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list