Linux 软件免费装
Banner图

CU Debug Tool by CodeUnion

开发者 hydr4x
更新时间 2026年1月30日 00:54
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPLv2 or later
版权网址: 版权信息

标签

debug sql developer hooks debugger

下载

7.2.1 7.2.0

详情介绍:

CU Debug Tool is a lightweight yet powerful debugging assistant designed for WordPress developers. Built with a modular architecture, it provides a clean, dark-mode overlay that helps you analyze what is happening under the hood of your WordPress site. Key Features: Security & Performance The tool is only visible to administrators (manage_options capability).

安装:

  1. Upload the plugin files to the /wp-content/plugins/cu-debug-tool directory, or install the plugin through the WordPress plugins screen.
  2. Activate the plugin through the 'Plugins' screen in WordPress.
  3. Crucial Step: Open your wp-config.php file and add the following line: define( 'CU_DEBUG', true );
  4. The debug bar will now appear at the bottom of your site for logged-in administrators (only on frontend!).

屏幕截图:

  • **Globals** - Inspection of current request data, including `$_POST`, `$_GET`, `$_SERVER`, some wp-config constants and Cookies.
  • **Inspector** - Easily check any options from your WordPress database.
  • **Tools** - Administrative utilities to flush rewrite rules, manage Transients, and send test emails.
  • **SQL Monitor** - Real-time analysis of executed database queries with a toggle to enable recording only when needed.

常见问题:

I installed the plugin, but the bar is not visible. Why?

For security reasons, this plugin requires an explicit constant to be defined. Please ensure you have added define( 'CU_DEBUG', true ); to your wp-config.php file. Also, ensure you are logged in as an Administrator. Finally, keep in mind that this is a frontend-only tool — you will not see any options in the backend Admin menu.

Does the SQL Monitor slow down my site?

SQL recording requires WordPress to save query history, which uses memory. By default, this is OFF. When you click "Start Recording" in the SQL tab, the plugin sets a temporary cookie that enables this feature only for your session.

Can I check which file registered a shortcode?

Yes! Go to the "Registry" tab. The plugin uses PHP Reflection to attempt to locate the exact file and line number where the shortcode callback function is defined.

Why can't I see anything in the Log tab?

If you want to see the logs, make sure you have the following options enabled in your wp-config.php file:

  1. define('WP_DEBUG', true);
  2. define('WP_DEBUG_LOG', true);
  3. define('WP_DEBUG_DISPLAY', false); Ensure that your debug.log file is in the default location (wp-content/debug.log).

Why is there nothing in my Dumps tab?

The Dumps tab is empty by default because it only displays data that you explicitly capture. To see data here, you must use the helper function cu_dump($variable) within your theme or plugin code. It works similarly to var_dump(), but instead of breaking your layout, it safely displays the formatted data inside the debug panel. Example usage: \$my_data = ['id' => 123, 'status' => 'active']; cu_dump( \$my_data );

更新日志:

7.2.1 7.2.0 7.1.3 7.1.2 7.1.1 7.1.0 7.0.1 7.0.0 5.1.1 5.1.0 5.0.0 4.6.0 4.1.1 1.0.0