PHPackages                             dida/debug - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. dida/debug

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

dida/debug
==========

A tiny debugger.

v1.0.2(8y ago)018MITPHPPHP ^5.4 || ^7.0

Since Oct 7Pushed 8y agoCompare

[ Source](https://github.com/zeupin/dida-debug)[ Packagist](https://packagist.org/packages/dida/debug)[ Docs](https://github.com/zeupin/dida-debug)[ RSS](/packages/dida-debug/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

Dida\\Debug 组件库
===============

[](#didadebug-组件库)

`Dida\Debug` 一个小巧的Debug，以更加清晰易读的方式，输出调试变量信息。它是 [宙品科技](http://zeupin.com) 开源的 [Dida框架](http://dida.zeupin.com) 的一个功能组件库。

- MIT开源协议。
- 对Array型变量可以输出美观的组对齐格式。
- 对Array型变量的输出是用\[...\]，而不是用PHP内置的array(...)。

使用
--

[](#使用)

用Composer安装：

```
composer require dida/debug
```

在PHP中使用：

```
use Dida\Debug\Debug;

echo Debug::varDump($var1, $var2, ...);
```

API
---

[](#api)

### `public static function halt($var, $varname = null)`

[](#public-static-function-haltvar-varname--null)

> 显示一个需要跟踪的变量，然后停止运行。 如果是想不显示变量就直接停止的话，建议用PHP自带的die()或者exit()。本类主要目的是Debug用途，函数设计时，重点考虑的是Debug时的方便。

### `public static function variable($var, $varname = null)`

[](#public-static-function-variablevar-varname--null)

> 显示一个需要跟踪的变量，和halt()类似，但是显示后，不会退出。

### `public static function varDump($var1, $val2, ...)`

[](#public-static-function-vardumpvar1-val2-)

> 导出变量。

### `public static function varExport($var, $varname = null)`

[](#public-static-function-varexportvar-varname--null)

> 输出或返回一个变量的字符串表示。

关于
--

[](#关于)

- 作者： [Macc Liu](https://github.com/maccliu)
- 感谢： [宙品科技](http://zeupin.com) , 尤其是 [Dida 项目团队](http://dida.zeupin.com)。

版权声明
----

[](#版权声明)

版权所有 (c) 2017-2018 上海宙品信息科技有限公司。
Copyright (c) 2017-2018 Zeupin LLC.

源代码采用MIT授权协议。
Licensed under The MIT License.

如需在您的项目中使用，必须保留本源代码中的完整版权声明。
Redistributions of files MUST retain the above copyright notice.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Total

2

Last Release

3088d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22cf1a638337842f99374a665fbf29414b5ef626808f75c9816ca1afcb7e2dfc?d=identicon)[dida](/maintainers/dida)

---

Top Contributors

[![maccliu](https://avatars.githubusercontent.com/u/2162090?v=4)](https://github.com/maccliu "maccliu (16 commits)")

### Embed Badge

![Health badge](/badges/dida-debug/health.svg)

```
[![Health](https://phpackages.com/badges/dida-debug/health.svg)](https://phpackages.com/packages/dida-debug)
```

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M914](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k28](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
