Title: dbug
Author: postpostmodern
Published: <strong>2010 年 2 月 15 日</strong>
Last modified: 2018 年 1 月 29 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/dbug.svg)

# dbug

 作者：[postpostmodern](https://profiles.wordpress.org/postpostmodern/)

[下载](https://downloads.wordpress.org/plugin/dbug.zip)

 * [详情](https://cn.wordpress.org/plugins/dbug/#description)
 * [评价](https://cn.wordpress.org/plugins/dbug/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/dbug/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/dbug/#developers)

 [支持](https://wordpress.org/support/plugin/dbug/)

## 描述

dbug() dlog() ddbug()

### dbug Basics

#### Debugging

Call with up to three arguments:
 <?php // output a variable dbug( $var );

    ```
        // output a variable with a title           
        dbug( $debug, 'Testing' );

        // output a variable with a title and information from the last 6 steps from debug_backtrace
        dbug( $somevalue, 'Trying to figure some shit out', 6 );
    }
    ```

or use `ddbug` to dbug and die.

#### Error Logging

Call with up to three arguments:
 <?php // log a variable dlog( $val );

    ```
        // log a variable with a title
        dlog( $buggy, 'what is $buggy' );

        // log a variable with a title into the file 'bug_trap' 
        dlog( $somevalue, 'im desperate', 'bug_trap' );
    }
    ```

#### Production / Development Environments

you should have them

## 安装

 1. Place entire /dbug/ directory to the /wp-content/plugins/ directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Set logging to screen or to to files, and the larget file size for logs
 4. Write some code
 5. Can’t figure something out? dbug( $var )
 6. Need to write yourself a note? dbug( $var, ‘this is super cool’ )
 7. How many lines of backtrace do you need? dbug( $var, ‘oh wow!’, 25 )
 8. Want to dbug and die? Use ddbug()

## 常见问题

  Installation Instructions

 1. Place entire /dbug/ directory to the /wp-content/plugins/ directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Set logging to screen or to to files, and the larget file size for logs
 4. Write some code
 5. Can’t figure something out? dbug( $var )
 6. Need to write yourself a note? dbug( $var, ‘this is super cool’ )
 7. How many lines of backtrace do you need? dbug( $var, ‘oh wow!’, 25 )
 8. Want to dbug and die? Use ddbug()

  This doesn’t do anything!

well

  Why did you create dbug?

Because I cant write code without it

## 评价

此插件暂无评价。

## 贡献者及开发者

「dbug」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ postpostmodern ](https://profiles.wordpress.org/postpostmodern/)
 *   [ pinecone-dot-website ](https://profiles.wordpress.org/pinecone-dot-io/)

[帮助将「dbug」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/dbug)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/dbug/)，查看[SVN仓库](https://plugins.svn.wordpress.org/dbug/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/dbug/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/dbug/)。

## 更新日志

#### 1.9.8

change create_function for php >= 7.2

#### 1.9.5

require php 5.4

#### 1.9.3

composer tweaks

#### 1.9.2

Add composer info, autoload

#### 1.9

Log viewer in admin

#### 1.89

Slightly better class method information

#### 1.88

Moved admin styles inline because of reasons

#### 1.87

Improved default log filesize logic, added ddlog()

#### 1.86

Registered css for mu-plugins correctly

#### 1.85

Fixed offset in backtrace

#### 1.81

Fixed sloppy error which disabled admin screen 🙁

#### 1.8

Code cleanup, mostly in backtrace

#### 1.74

Whoops, didn’t add _htaccess.php to SVN :-p

#### 1.73

Fixed creating .htaccess file when using mu-plugins

#### 1.72

Set dbug to never show on screen if logs are turned on, added REQUEST_URI to all
logs

#### 1.7

Moved admin settings into separate class, cleanup of core code

#### 1.55

Fixed using float as argument $k in dbug

#### 1.54

Fixed deprecated argument in add_options_page()

#### 1.53

Fixed a bug in detecting MU

#### 1.52

Fixed a bug in logging integer keyed arrays

#### 1.5

Changed some things, I don’t remember what

#### 1.4

Better handling for MU / single blog.
 All options and settings for MU are now global,
saved in blog #1 database.

#### 1.32

Added ddbug() (dbug and die)

#### 1.31

fixed behavior in error handlers to return false, try /catch blocks work as expected.

#### 1.2

last bit of namespace pollution cleaned up
 check for PHP 5 css tweaks

#### 1.1

added preference for log filesize

#### 1.08

code cleanup, reducing namespace pollution

#### 1.0

yes, its here

## 额外信息

 *  版本 **1.9.8**
 *  最后更新：**8 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  语言
 * [English (US)](https://wordpress.org/plugins/dbug/)
 * 标签
 * [debug](https://cn.wordpress.org/plugins/tags/debug/)[error log](https://cn.wordpress.org/plugins/tags/error-log/)
 *  [高级视图](https://cn.wordpress.org/plugins/dbug/advanced/)

## 评级

 1 星（最高 5 星）。

 *  [  0 条 5 星评价     ](https://wordpress.org/support/plugin/dbug/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/dbug/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/dbug/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/dbug/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/dbug/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/dbug/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/dbug/reviews/)

## 贡献者

 *   [ postpostmodern ](https://profiles.wordpress.org/postpostmodern/)
 *   [ pinecone-dot-website ](https://profiles.wordpress.org/pinecone-dot-io/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/dbug/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://cash.me/$EricEaglstun)