2017 © Pedro Peláez
 

library debug

A tiny debugger.

image

dida/debug

A tiny debugger.

  • Thursday, January 4, 2018
  • by dida
  • Repository
  • 0 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Dida\Debug 组件库

Dida\Debug 一个小巧的Debug,以更加清晰易读的方式,输出调试变量信息。它是 宙品科技 开源的 Dida框架 的一个功能组件库。, (*1)

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

使用

用Composer安装:, (*2)

composer require dida/debug

在PHP中使用:, (*3)

use Dida\Debug\Debug;

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

API

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

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

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

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

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

导出变量。, (*6)

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

输出或返回一个变量的字符串表示。, (*7)

关于

版权声明

版权所有 (c) 2017-2018 上海宙品信息科技有限公司。
Copyright (c) 2017-2018 Zeupin LLC. http://zeupin.com, (*8)

源代码采用MIT授权协议。
Licensed under The MIT License., (*9)

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

The Versions

04/01 2018

dev-master

9999999-dev https://github.com/zeupin/dida-debug

A tiny debugger.

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

24/11 2017

v1.0.2

1.0.2.0 https://github.com/zeupin/dida-debug

A tiny debugger.

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

07/10 2017

v1.0.1

1.0.1.0 https://github.com/zeupin/dida-debug

A tiny debugger.

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0