AnyWareX Debug Switch 1.0.1 - Usage Guide

Activate the plugin and open the top-level AnyWareX Debug Switch admin menu. Administrator capability manage_options is required.

Configuration check

Run Preflight. The three existing definitions WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY must use literal booleans on individual single-line statements before the WordPress bootstrap. Missing definitions must be added manually, without duplicates. Copy Code copies only the missing definitions and does not edit files.

The usual WordPress configuration and independent scalar/array plugin settings are supported. Conditional, duplicate, dynamic, multiline or otherwise uncertain definitions are rejected. Editing requires the local direct WordPress filesystem and a regular non-symlink configuration file. A rejected configuration does not prevent log access.

Preview and explicit confirmation

  1. Choose Enable Debug - Preview or Disable Debug - Preview.
  2. Review the current and planned values, including unchanged definitions. The preview never displays configuration source or credentials.
  3. Check the explicit confirmation box and choose Confirm Changes, or choose Cancel.
  4. Before writing, the plugin rereads the file, compares its hash and validates the confirmed changes again. A changed or expired preview must be recreated.

Enable requests WP_DEBUG=true and WP_DEBUG_LOG=true. Disable requests both values false. Both operations propose WP_DEBUG_DISPLAY=false. All three loaded runtime values are displayed; differences from file values are identified.

Preview and cancellation do not write the configuration. Confirmations are single-use, expire after ten minutes and belong to the current user, login session and blog. A new preview replaces that user's previous preview.

Direct-write limitations

Writes are not atomic. A disk error, partial write or terminated request can damage wp-config.php and make WordPress unavailable. Keep an independent protected backup outside the web root. The editor does not automatically retry or roll back. Inspect write or verification errors externally before continuing.

The plugin's installation-wide lock serializes its own writers but cannot block an external editor. A crashed request may leave a persistent lock; a server administrator must follow the recovery instructions in README.md before removing it. File permissions are preserved. Hosting OPcache settings may require cache invalidation when loaded values lag behind the file.

Log tools

Log Viewer displays the latest 200,000 bytes of WP_CONTENT_DIR/debug.log. Summary counts entries in that preview by severity. Download retrieves the complete log; Clear empties it after the existing browser confirmation; Refresh reloads the page. Custom log destinations are not managed, and large logs can consume substantial memory.

Information/setup notices are blue, unsupported or conflicting configurations yellow, actual errors red, and successful actions green. AJAX checks show their result without silently discarding errors.

Deactivation or removal does not restore prior debug values or delete logs. Disable debugging after troubleshooting and protect log access at server level. Directory approval is not implied by these changes.