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 );
$var can has any data type.
$varis a string or any simple value, the value is outputted directly.
$varis an array or object, the output is the same as
print_r( $var ).
$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)
- Unzip the download package
- Activate the plugin through the ‘Plugins’ menu in WordPress
There are no reviews for this plugin.
Contributors & Developers
“Debug Bar Custom Info” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Add 2nd param “label” to
do_actionto prevent fatal error when plugin files is not loaded
- First release