WordPress.org

Make WordPress Core

Opened 5 weeks ago

#51597 new defect (bug)

Add debugging of a single session

Reported by: galbaras Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: ui, administration Cc:

Description

At the moment, debugging options are controlled by constants. This means that an entire site is either producing debug output and/or saving queries, or it doesn't.

In this situation, every user session sees the same output, and that's a problem for all but the person who's trying to fix the problem. On large, active sites, this can be a problem for many, many users, thus affecting the respective business negatively for no good reason.

I propose to add a way to debug only a single session. Those with the "administrator" role and/or a new "debug" capability should see a new menu in the admin bar, where they can turn on various debugging options.

By using GET parameters and/or cookies, it should be possible to then trigger debugging functions that match the user's selection only for that one session.

Some debugging still requires site-wide flags, e.g. background tasks, API calls, etc. Therefore, the new mechanism cannot replace the use of constants completely. However, if may be possible to identify cases for constants, cases for session flags and cases for both.

Change History (0)

Note: See TracTickets for help on using tickets.