Linux 软件免费装
Banner图

DebugZen

开发者 parag44
更新时间 2026年11月19日 18:01
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

debug debug log error log wp-config php errors

下载

1.0.0 1.1.0 1.1.1 1.2.0 1.3.0

详情介绍:

DebugZen gives administrators one focused screen for WordPress debugging: turn the debug constants on and off, then read, filter and clear debug.log without FTP or SSH. Debug constants without editing files Switches at the top of the DebugZen screen read and update these constants in wp-config.php: Changes are written with the WP Config Transformer library, which parses wp-config.php instead of using regex or string replacement. If WP_DEBUG_LOG points to a custom file, that path is kept. If wp-config.php is read-only, DebugZen shows the exact lines to add yourself. Turning on WP_DEBUG_DISPLAY shows a reminder that errors are now printed to visitors. A log viewer built for reading Security DebugZen is limited to administrators (super admins on multisite), and every request is checked with a nonce. Source previews need a server-signed token tied to the current user, are confined to the WordPress installation with realpath() checks, never include wp-config.php, dotfiles or the active log, and files are only read, never executed. Third-party libraries DebugZen includes WP Config Transformer by the WP-CLI Development Group. It is distributed under the MIT License. Its license is included at vendor/wp-cli/wp-config-transformer/LICENSE. This plugin does not contact external services, collect telemetry, or load remote executable code.

安装:

  1. Upload the debugzen folder to /wp-content/plugins/, or install the plugin ZIP from Plugins > Add New > Upload Plugin.
  2. If installing from source without the bundled vendor directory, run composer install --no-dev --optimize-autoloader inside the plugin directory.
  3. Activate DebugZen through the Plugins screen in WordPress.
  4. Open DebugZen in the WordPress admin sidebar (below Tools).
  5. Ensure wp-config.php is writable before saving changes. Restore restrictive permissions after configuration if required by your hosting environment.

屏幕截图:

  • An open fatal error with the source code around the failing line, plus stack trace and raw tabs.
  • Settings for log rotation and the viewer.

升级注意事项:

1.3.0 DebugZen moves to its own admin menu item, with debug switches on the main screen, source filters, and a redesigned log viewer. 1.2.0 Major workbench UI polish, full-width WP Admin layout, security hardening, and full WordPress.org Plugin Check compatibility. 1.1.0 Major feature release introducing an interactive diagnostic log viewer, smart duplicate log grouping, source code context preview with editor jump, real-time live tail, and log rotation. 1.0.0 Initial release.

常见问题:

Does the plugin directly edit debug constants with string replacement?

No. It uses the WP Config Transformer library from WP-CLI, which reads wp-config.php with PHP's tokenizer and updates only the three debug constants. If a constant is missing, it is added; everything else in the file is left as it was.

Why are the debug switches greyed out?

wp-config.php is read-only for the web server, which many hosts do on purpose. DebugZen then shows "read-only" next to the switches and lists the exact lines to add to wp-config.php yourself. The log viewer keeps working either way.

I see "Unable to locate placement anchor." What does it mean?

DebugZen tried to add a debug constant that is not in wp-config.php yet, but could not find where to put it. New constants go just above the line /* That's all, stop editing! */, and your wp-config.php does not have that line. This happens when the line was deleted or reworded, when WordPress was installed in another language, or when a host generated its own wp-config.php. Nothing is written to the file when this error appears. To fix it, open wp-config.php and add this line on its own, just above require_once ABSPATH . 'wp-settings.php';: /* That's all, stop editing! */ Then use the switch again. Or add the constants yourself in the same place: define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );

Is it safe to use on a live site?

Yes, with two precautions. Keep WP_DEBUG_DISPLAY off, so errors are written to the log instead of being shown to visitors; DebugZen warns you while it is on. And because wp-content/debug.log can be downloaded by anyone who guesses the address on many servers, consider setting WP_DEBUG_LOG to a path outside your web root, for example define( 'WP_DEBUG_LOG', '/home/example/logs/debug.log' );. DebugZen reads custom paths and keeps them when you toggle logging.

Who can use DebugZen?

Administrators with the manage_options capability. On multisite, only super admins can use it, because wp-config.php and the log are shared by the whole network. Developers can change the required capability with the debugzen_capability filter.

Will it slow down my site?

No. DebugZen's scripts and styles load only on its own screen. Other admin pages get just the sidebar item and toolbar link. The viewer reads at most the last 1 MB of the log, and Live reads only the bytes added since its last check.

Where is the debug log?

By default, WordPress writes the log to wp-content/debug.log. If WP_DEBUG_LOG contains a custom path, DebugZen uses that path.

How does the source code preview stay secure?

Each preview needs a server-signed token tied to your user account. Paths are resolved with realpath() and must stay inside the WordPress installation, and wp-config.php, dotfiles and the active log file are never shown. Files are only read, never executed.

Does DebugZen send data anywhere?

No. DebugZen has no telemetry, analytics, external API connection, or remote code loading.

更新日志:

1.3.0 1.2.0 1.1.1 1.1.0 1.0.0