PHPackages                             adachsoft/debugger - 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. [CLI &amp; Console](/categories/cli)
4. /
5. adachsoft/debugger

ActiveLibrary[CLI &amp; Console](/categories/cli)

adachsoft/debugger
==================

Check your logs in the console.

v0.1.1(3mo ago)0374↓85.7%MITPHPPHP ^8.3CI failing

Since Dec 25Pushed 3mo agoCompare

[ Source](https://github.com/adachsoft/Debugger)[ Packagist](https://packagist.org/packages/adachsoft/debugger)[ RSS](/packages/adachsoft-debugger/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

adachsoft/debugger
==================

[](#adachsoftdebugger)

A small, framework-agnostic PHP debugger/logger that can dump variables, print backtraces and measure execution time.

It can be used directly by instantiating `AdachSoft\Debugger\Debugger` with your preferred `LogInterface` and `ParserInterface`, or via the global facade `D` / helper function `d()`.

Requirements
------------

[](#requirements)

- PHP ^8.3

Installation
------------

[](#installation)

```
composer require adachsoft/debugger
```

Quick start (explicit instance)
-------------------------------

[](#quick-start-explicit-instance)

```
use AdachSoft\Debugger\Debugger;
use AdachSoft\Debugger\Log\LogPrint;
use AdachSoft\Debugger\ParserVarDump;

$debugger = new Debugger(new LogPrint(), new ParserVarDump());

$debugger->varDump(['hello' => 'world']);
$debugger->backTrace();
```

Quick start (factory)
---------------------

[](#quick-start-factory)

The factory provides ready-to-use presets:

```
use AdachSoft\Debugger\DebuggerFactory;

$debugger = DebuggerFactory::create();
$debugger->varDump('hello');
```

Available presets:

- `DebuggerFactory::create()`
- `DebuggerFactory::createColored()`
- `DebuggerFactory::createTypeWithoutValue()`

Global facade (D) and helper function (d)
-----------------------------------------

[](#global-facade-d-and-helper-function-d)

This package ships a global class `D` (in the global namespace) and a global helper function `d()`. They are autoloaded through Composer `autoload.files`, so they work after including `vendor/autoload.php`.

```
require_once __DIR__ . '/vendor/autoload.php';

d(['a' => 1, 'b' => [true, null]]);

D::useTypeOnly();
d(['a' => 1, 'b' => [true, null]]);

D::useStandard();
D::dump('standard mode', ['x' => 123]);
```

Timing
------

[](#timing)

```
D::start();
usleep(100_000);
$elapsed = D::stop('sleep');

D::dump('elapsed', $elapsed);
```

Backtrace
---------

[](#backtrace)

```
D::trace();
```

Error handler
-------------

[](#error-handler)

```
use AdachSoft\Debugger\Debugger;

Debugger::showAllErrors();

$debugger = D::getInstance();
$debugger->setErrorHandler();

// Any PHP warning/notice/error will be formatted and sent to the configured logger.
```

Logging targets
---------------

[](#logging-targets)

The debugger delegates output to a `LogInterface` implementation.

Built-in loggers (see `src/Log`):

- `AdachSoft\Debugger\Log\LogPrint` (console output)
- `AdachSoft\Debugger\Log\LogToFile` (append to a file)
- `AdachSoft\Debugger\Log\LogToServer` (send to a TCP server)

Example:

```
use AdachSoft\Debugger\Debugger;
use AdachSoft\Debugger\Log\LogToFile;
use AdachSoft\Debugger\ParserVarDump;

$debugger = new Debugger(
    new LogToFile(fileName: __DIR__ . '/debug.log'),
    new ParserVarDump(),
);

$debugger->varDump('saved to file');
```

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance78

Regular maintenance activity

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

Total

2

Last Release

114d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fb6cd9131705b3b2d372b9d363e67af0fffb4676b26bb662bd200c2f1df1329?d=identicon)[Arkadiusz Adach](/maintainers/Arkadiusz%20Adach)

---

Top Contributors

[![adachsoft](https://avatars.githubusercontent.com/u/26148782?v=4)](https://github.com/adachsoft "adachsoft (14 commits)")

---

Tags

consoledebuglogs

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adachsoft-debugger/health.svg)

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

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B13.6k](/packages/symfony-console)[psy/psysh

An interactive shell for modern PHP.

9.8k582.3M806](/packages/psy-psysh)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.7k357.7M10.7k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k271.5M375](/packages/nunomaduro-termwind)[wp-cli/php-cli-tools

Console utilities for PHP

68227.8M375](/packages/wp-cli-php-cli-tools)[buggregator/trap

A simple and powerful tool for debugging PHP applications.

2702.2M65](/packages/buggregator-trap)

PHPackages © 2026

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