跳到内容

Debug Bar Custom Info

v1.0.2

FitWP · 2014年6月13日 上架

This plugin adds an extra panel to Debug Bar plugin that allows developers to output custom debug info.

正在使用
10+
评分
5.0 / 5
累计下载
3,221
最近更新
2014年7月1日
1 条评价需要 WordPress 3.8+已测试到 3.9.40

贡献者

截图

Custom Info Panel
Custom Info Panel

This plugin adds an extra panel to Debug Bar plugin that allows developers to output custom debug info.

Developers can log any variable to see its value when running PHP in WordPress. This helps developers see the real-time values of variables. It works exactly like console.log() in browsers.

How to add custom debug info

Add the following code wherever you want to debug a variable:

do_action( 'add_debug_info', $var, $label );

where $var can has any data type.

  • If $var is a string or any simple value, the value is outputted directly.
  • If $var is an array or object, the output is the same as print_r( $var ).

And $label is the description label (optional).

How to view debug info

  • Click on Debug Bar in the top right of the admin bar
  • Select Custom Info panel (see screenshots)

Project Homepage | Report Bugs | Donate

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums