[wordpress插件] Debug Bar Tracer调试栏跟踪器

wordpress 插件 文章 2020-04-14 05:11 492 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Many times when creating a custom theme or plugin there is need to view a piece of data you are working with which can be unweidly and not to mention ugly.

很多时候创建自定义主题或插件时,需要查看正在使用的数据,这些数据可能是不可靠的,更不用说难看了。

This plugin adds a new tab to the Debug Bar plugin that allows you to “trace” the data to a window and displays not only the data, but where the call came from and optionally a description.

该插件在“调试栏”插件中添加了一个新标签,可让您将数据“跟踪”到窗口中,不仅显示数据,还显示调用的来源以及描述(可选)。

Plus, it’s green like the Matrix.

另外,它像矩阵一样呈绿色。

About debug_trace

关于debug_trace

The method debug_trace() takes one parameter that can be of any data type.

debug_trace()方法采用一个可以是任何数据类型的参数。

If you want to pass a descriptor for the debug_trace(), pass an array with the following indices:

如果要传递debug_trace()的描述符,请传递具有以下索引的数组:

    • ‘key’ => The descriptor
    • “键” =>描述符

    • ‘data’ => What you want to trace – can be any data type.
    • “数据” =>您要跟踪的内容–可以是任何数据类型。

    Behind the scenes, each trace is actually an array containing the location of the call, the data and optionally a custom key.

    在幕后,每个跟踪实际上都是一个数组,其中包含调用的位置,数据和可选的自定义键。

    If the parameter passed to debug_trace() is an array that has a key of ‘key’ or ‘data’, then the method overrides the defaults with it.

    如果传递给debug_trace()的参数是键为“ key”或“ data”的数组,则该方法将使用它覆盖默认值。

    Otherwise, the method assumes you want to trace the passed parameter as the ‘data’.

    否则,该方法假定您要跟踪传递的参数作为“数据”。

安装步骤

    1. Upload plugin-name.php to the /wp-content/plugins/ directory
    2. plugin-name.php 上载到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Be sure you have Debug Bar installed and active
    6. 确保已安装并激活了调试栏

下载地址
https://downloads.wordpress.org/plugin/debug-bar-tracer.1.0.zip
-EOF-

AI助手支持GPT4.0