PHPackages                             tbondois/php-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. tbondois/php-debug

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

tbondois/php-debug
==================

PHP debug libraries (dumpers...) for common needs. should not be installed in production or use IP restriction feature.

0.3.2(6y ago)133MITPHPPHP &gt;=7.0

Since Jun 17Pushed 6y agoCompare

[ Source](https://github.com/tbondois/php-debug)[ Packagist](https://packagist.org/packages/tbondois/php-debug)[ Docs](https://packagist.org/packages/tbondois/php-debug)[ RSS](/packages/tbondois-php-debug/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (6)Versions (5)Used By (0)

PHP Debug
=========

[](#php-debug)

Presentation
------------

[](#presentation)

This project is based on [Kint](https://kint-php.github.io/kint/) and [VarDumper](https://symfony.com/doc/current/components/var_dumper.html). I added some features like IP restrictions.

Installation in a project
-------------------------

[](#installation-in-a-project)

```
composer require tbondois/php-debug --dev

```

Update it in a project
----------------------

[](#update-it--in-a-project)

```
composer update tbondois/php-debug

```

Usage
-----

[](#usage)

### Inclusion and basic usage

[](#inclusion-and-basic-usage)

```
include_once 'vendor/autoload.php';

debug_print_rich("Kint rich print alias !");
debug_print_simple("Kint simple print alias !");
debug_print_console("Kint browser-console log alias");
debug_print_content("Symfony-VarDumper alias !");
$dump = debug_print_return("Kint return alias");

debug_die_rich("Rich-print and kill script");
debug_die_simple("Simple-print and kill script");
debug_die_console("JS console and kill script");
debug_die_content("Symfony-VarDumper print and kill script");
```

### Access Control (Recommended for Production environments)

[](#access-control-recommended-for-production-environments)

#### Disable debug functions in the environment

[](#disable-debug-functions-in-the-environment)

To ensure this functions will be skipped, define manually in your `$_ENV` a specific variable.

- In Symfony or Laravel or project using `symfony/dotenv`, add this to you `.env` file :

```
TB_DEBUG_BLOCK_MODE = 1

```

- Or use the native PHP command :

```
putenv("TB_DEBUG_BLOCK_MODE=1");
```

- Or using this library helpers :

```
\debug_access::setEnvBlockMode(debug_access::MOD_BLOCK_WEB_WHITELIST);
```

#### Disable debug feature in the environment except for some people :

[](#disable-debug-feature-in-the-environment-except-for-some-people-)

If you want the features being executed for specific IP, add :

- In your `.env` file ;

```
TB_DEBUG_BLOCK_MODE=1
TB_DEBUG_WHITELIST_ADDRS=

```

- Or in PHP using native functions :

```
putenv("TB_DEBUG_BLOCK_MODE=1");
putenv("TB_DEBUG_WHITELIST_ADDRS=");
```

- Or using this library helpers :

```
\debug_access::setEnvBlockMode(\debug_access::MOD_BLOCK_WEB_WHITELIST);
\debug_access::setEnvWhitelistAddrs("");
```

You obviously have to replace `` by one or more IP addresses separated by comas (`,`). It will be compared by the one in `$_SERVER["REMOTE_ADDR"]`.

#### The Blocking Modes :

[](#the-blocking-modes-)

Suivant la valeur de `TB_DEBUG_BLOCK_MODE` :

- 0 : Blocked nowhere for nobody.
- 1 : Block web for addresses not whitelisted.
- 2 : Blocked in web for everybody
- 4 : Blocked in local terminal
- 5 : (2+1) Blocked in local terminal AND web for addresses not whitelisted.
- 6 : (4 + 2) Blocked everywhere for everybody.

References
----------

[](#references)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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 ~2 days

Total

4

Last Release

2517d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c7484324dbc8a4ba4637cea0e86e36deaa2f2511bd63d0d13aa3732ac5dbda1?d=identicon)[tbondois](/maintainers/tbondois)

---

Top Contributors

[![tbondois](https://avatars.githubusercontent.com/u/11269723?v=4)](https://github.com/tbondois "tbondois (26 commits)")

---

Tags

phpprintersymfonylaraveldebugdumpprintdumpervarprint

### Embed Badge

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

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

###  Alternatives

[jbzoo/jbdump

Script for debug and dump PHP variables and other stuff. This tool is a nice replacement for print\_r() and var\_dump() functions.

211.1M3](/packages/jbzoo-jbdump)[php-sage/sage

☯ Insightful PHP debugging assistant.

5639.7k5](/packages/php-sage-sage)[leeoniya/dump-r

a cleaner, leaner mix of print\_r() and var\_dump()

12368.1k5](/packages/leeoniya-dump-r)[php-console/laravel-service-provider

Laravel service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

7361.2k1](/packages/php-console-laravel-service-provider)[ivoba/stop

nice output for debug functions for PHP 5.3

1041.9k5](/packages/ivoba-stop)

PHPackages © 2026

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