PHPackages                             apex/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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. apex/debugger

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

apex/debugger
=============

Lightweight, portable debugger for use in any application.

2.0(4y ago)18781MITPHPPHP &gt;=8.0

Since Feb 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/apexpl/debugger)[ Packagist](https://packagist.org/packages/apex/debugger)[ Docs](https://apexpl.io)[ RSS](/packages/apex-debugger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (7)Used By (1)

Apex Debugger
=============

[](#apex-debugger)

A lightweight, portable debugger that can easily be used within any application to gather and analyze details of requests. It supports:

- Combines PSR-3 compliant logging for simplicity, so one call will add line item to both debugger and logger.
- Use any numeric debug level to signify the detail of messages when both, adding debug messages and compiling debug sessions.
- Retrieve and analyze session information via command line tool, rendered HTML, or PHP arrays.
- Saves basic request info, debug messages including caller (file, line, class, method), full backtrace, inputs (post, get, cookie, et al), and any optional items.

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

[](#installation)

Install via Composer with:

> `composer require apex/debugger`

Table of Contents
-----------------

[](#table-of-contents)

1. [Debugger](https://github.com/apexpl/debugger/blob/master/docs/debugger.md)
2. Reading Debug Sessions
    1. [Command Line Viewer](https://github.com/apexpl/debugger/blob/master/docs/cli_viewer.md)
    2. [HTML Loader](https://github.com/apexpl/debugger/blob/master/docs/html_loader.md)
    3. [Array Loader](https://github.com/apexpl/debugger/blob/master/docs/array_loader.md)

Basic Usage
-----------

[](#basic-usage)

```
use Apex\Debugger\Debugger;

// Init debugger
$debugger = new Debugger(3);   // 3 = detail level of debug messages to log

// Throughout your code, add debug items.
$debugger->add(3, "My debug line item...", 'notice');   // 'notice' will add to PSR-3 logger as well.

// Add more detailed line at level 5, no logging
$debugger->add(5, 'Detailed item');

// At end of request, or within exception handler, finish up and save debug session
$session = $debugger->finish();

// Within exception handler
function handleException(Exception $e) {
    $debugger->finish($e);
}
```

Reading Debug Sessions
----------------------

[](#reading-debug-sessions)

Simply run the PHP script located at /vendor/bin/debugger in your installation:

`php ./vendor/bin/debugger`

The menu based command line tool will start showing a list of recently saved debug sessions, which you may enter into. The next screen shows another menu allowing you to select the exact information you would like to view regarding the request. Instead of the command line tool, you may also retrieve debug sessions via the [HTML Loader](https://github.com/apexpl/debugger/blob/master/docs/html_loader.md) or the [ArrayLoader](https://github.com/apexpl/debugger/blob/master/docs/array_loader.md).

Follow Apex
-----------

[](#follow-apex)

Loads of good things coming in the near future including new quality open source packages, more advanced articles / tutorials that go over down to earth useful topics, et al. Stay informed by joining the [mailing list](https://apexpl.io/) on our web site, or follow along on Twitter at [@ApexPlatform](https://twitter.com/ApexPlatform).

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Recently: every ~84 days

Total

6

Last Release

1560d ago

Major Versions

0.1.5 → 2.02022-01-30

PHP version history (2 changes)0.1PHP &gt;=8.0.0

2.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fe486d2ed7db571c0519bb0d52b08b5e953a911936e87331e736a381ef96f29?d=identicon)[apex](/maintainers/apex)

---

Top Contributors

[![mdizak](https://avatars.githubusercontent.com/u/59886259?v=4)](https://github.com/mdizak "mdizak (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[filp/whoops

php error handling for cool kids

13.2k402.4M1.4k](/packages/filp-whoops)[symfony/error-handler

Provides tools to manage errors and ease debugging PHP code

2.7k651.8M581](/packages/symfony-error-handler)[php-debugbar/php-debugbar

Debug bar in the browser for php application

4.4k21.3M39](/packages/php-debugbar-php-debugbar)[symfony/ai-mate

AI development assistant MCP server for Symfony projects

1624.9k10](/packages/symfony-ai-mate)[koriym/xdebug-mcp

Universal PHP Xdebug MCP Server with AI-optimized debugging support

4011.6k1](/packages/koriym-xdebug-mcp)

PHPackages © 2026

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