Summary
Studio already lets you toggle WP_DEBUG_LOG and WP_DEBUG_DISPLAY from a site's settings (added in #2553). I'd like to request two more debug-related constants be exposed in the same place:
SCRIPT_DEBUG — docs
WP_ENVIRONMENT_TYPE — docs
Motivation
Today you can toggle the debug log and error display from the UI, but to change SCRIPT_DEBUG you have to manually edit wp-config.php. That's a problem for a couple of reasons:
- It's essential for JavaScript block editor work. With
SCRIPT_DEBUG enabled, WordPress loads the un-minified/dev builds of core scripts, which surfaces proper, readable React errors (component stack traces, dev warnings) instead of the minified production noise. Anyone developing blocks or working in the editor needs this on regularly.
- Manual
wp-config.php edits aren't reliably picked up. Studio manages wp-config.php, and hand-editing it doesn't always get reflected/persisted, so it's fragile compared to a first-class setting.
WP_ENVIRONMENT_TYPE is similarly useful to control from the UI — it lets you set the site to development/local/staging/production, which affects wp_get_environment_type() and the behavior of plugins/themes that branch on it. (Note the closed #165, where WP_ENVIRONMENT_TYPE being unset defaulted sites to production.)
Being able to toggle these in the same settings panel as the existing debug options — with Studio owning the config change — would be much more reliable than editing the file by hand.
Summary
Studio already lets you toggle
WP_DEBUG_LOGandWP_DEBUG_DISPLAYfrom a site's settings (added in #2553). I'd like to request two more debug-related constants be exposed in the same place:SCRIPT_DEBUG— docsWP_ENVIRONMENT_TYPE— docsMotivation
Today you can toggle the debug log and error display from the UI, but to change
SCRIPT_DEBUGyou have to manually editwp-config.php. That's a problem for a couple of reasons:SCRIPT_DEBUGenabled, WordPress loads the un-minified/dev builds of core scripts, which surfaces proper, readable React errors (component stack traces, dev warnings) instead of the minified production noise. Anyone developing blocks or working in the editor needs this on regularly.wp-config.phpedits aren't reliably picked up. Studio manageswp-config.php, and hand-editing it doesn't always get reflected/persisted, so it's fragile compared to a first-class setting.WP_ENVIRONMENT_TYPEis similarly useful to control from the UI — it lets you set the site todevelopment/local/staging/production, which affectswp_get_environment_type()and the behavior of plugins/themes that branch on it. (Note the closed #165, whereWP_ENVIRONMENT_TYPEbeing unset defaulted sites toproduction.)Being able to toggle these in the same settings panel as the existing debug options — with Studio owning the config change — would be much more reliable than editing the file by hand.