PHPackages                             bdk/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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. bdk/debug

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

bdk/debug
=========

Browser/javascript like console class for PHP

v3.5(5mo ago)819.0k↓45%4[3 PRs](https://github.com/bkdotcom/PHPDebugConsole/pulls)1MITPHPPHP ^5.4 || ^7.0 || ^8.0CI passing

Since Dec 4Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/bkdotcom/PHPDebugConsole)[ Packagist](https://packagist.org/packages/bdk/debug)[ Docs](http://bradkent.com/php/debug)[ RSS](/packages/bdk-debug/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (49)Used By (1)

PHP﻿Debug﻿Console
=================

[](#phpdebugconsole)

Browser/javascript like console class for PHP

Log, Debug, Inspect

**Website/Usage/Examples:**

- PHP port of the [javascript web console api](https://developer.mozilla.org/en-US/docs/Web/API/console)
- multiple simultaneous output options
    - [ChromeLogger](https://craig.is/writing/chrome-logger/techspecs)
    - [FirePHP](http://www.firephp.org/) (no FirePHP dependency!)
    - HTML
    - Plain text / file
    - &lt;script&gt;
    - WebSocket (WAMP)
    - "plugin"
- "Collectors" / wrappers for
    - Guzzle
    - Doctrine
    - Mysqli
    - PDO
    - PhpCurlClass
    - SimpleCache
    - SoapClient
    - SwiftMailer
    - more
- [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) (Logger) Implementation
- [PSR-15](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-15-request-handlers-meta.md) (Middleware) Implementation
- custom error handler
    - errors (even fatal) are captured / logged / displayed
    - optionally send error notices via email (throttled as to not to send out a flood of emails)
- password protected
- send debug log via email / Discord / Slack / MS Teams

[![Screenshot of PHPDebugConsole's Output](https://camo.githubusercontent.com/275812bf1d6aed9b282e74a186214211c337c46158b827ba140524d168b0c7b8/687474703a2f2f7777772e627261646b656e742e636f6d2f696d616765732f7068702f73637265656e73686f745f312e342e706e67)](https://camo.githubusercontent.com/275812bf1d6aed9b282e74a186214211c337c46158b827ba140524d168b0c7b8/687474703a2f2f7777772e627261646b656e742e636f6d2f696d616765732f7068702f73637265656e73686f745f312e342e706e67)

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

[](#installation)

This library supports PHP 5.4 - 8.5

It is installable and autoloadable via [Composer](https://getcomposer.org/) as [bdk/debug](https://packagist.org/packages/bdk/debug).

```
{
    "require": {
        "bdk/debug": "^3.5",
    }
}
```

### installation without Composer

[](#installation-without-composer)

As of v3.3 this is no longer officially supported due to now requiring one or more dependencies.

Usage
-----

[](#usage)

See

PSR-3 Usage
-----------

[](#psr-3-usage)

PHPDebugConsole includes a [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) implementation (which can be used as a [monolog](https://github.com/Seldaek/monolog) PSR handler). If you're using an application or library that uses these standards, drop PHPDebugConsole right in.

(this library includes neither psr/log or monolog/monolog. Include separately if needed.)

PSR-3:

```
// instantiate PHPDebugLogger / get instance
$debug = \bdk\Debug::getInstance();
$psr3logger = $debug->logger;
$psr3logger->emergency('fallen and can\'t get up');
```

monolog:

```
$monolog = new \Monolog\Logger('myApplication');
$monolog->pushHandler(new \bdk\Debug\Collector\MonologHandler($debug));
$monolog->critical('all your base are belong to them');
```

Methods
-------

[](#methods)

- log
- info
- warn
- error
- assert
- clear
- count
- countReset
- group
- groupCollapsed
- groupEnd
- profile
- profileEnd
- table
- time
- timeEnd
- timeLog
- trace
- *… [more](http://www.bradkent.com/php/debug#methods)*

Tests / Quality
---------------

[](#tests--quality)

[![Supported PHP versions](https://camo.githubusercontent.com/37140af4bc1c3c23bb29b3e054a22fffeccbb8a685c47d28672a70d1b957c908/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d504850266d6573736167653d352e342532302d253230382e3526636f6c6f723d626c7565)](https://camo.githubusercontent.com/37140af4bc1c3c23bb29b3e054a22fffeccbb8a685c47d28672a70d1b957c908/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d504850266d6573736167653d352e342532302d253230382e3526636f6c6f723d626c7565)[![Build Status](https://camo.githubusercontent.com/314473711471f34501543839cdd384ff8c3ae6e1e4910134be7cd44c34b5834b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626b646f74636f6d2f5048504465627567436f6e736f6c652f706870756e69742e796d6c2e7376673f6272616e63683d6d6173746572266c6f676f3d676974687562)](https://camo.githubusercontent.com/314473711471f34501543839cdd384ff8c3ae6e1e4910134be7cd44c34b5834b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626b646f74636f6d2f5048504465627567436f6e736f6c652f706870756e69742e796d6c2e7376673f6272616e63683d6d6173746572266c6f676f3d676974687562)[![Maintainability](https://camo.githubusercontent.com/ace79e9ae5cfd04953c43a0de6bf56f6adcf558d8bce12949ddb2b0dbda18dfa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f412d423f7374796c653d666c6174266c6f676f3d636f6465636c696d617465266c6162656c3d4d61696e7461696e6162696c697479266c6162656c436f6c6f723d35623562356226636f6c6f723d346363373165)](https://qlty.sh/gh/bkdotcom/projects/PHPDebugConsole)[![Coverage](https://camo.githubusercontent.com/201a14a8f4ea08e26a93e533c3cade52d8a620da9df7817d2f6b4db674ee7b81/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f39382532352d423f7374796c653d666c6174266c6f676f3d636f6465636c696d617465266c6162656c3d436f766572616765266c6162656c436f6c6f723d35623562356226636f6c6f723d346363373165)](https://qlty.sh/gh/bkdotcom/projects/PHPDebugConsole)

Changelog
---------

[](#changelog)

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance79

Regular maintenance activity

Popularity36

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.3% 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 ~99 days

Recently: every ~87 days

Total

42

Last Release

87d ago

Major Versions

v1.3.2 → v2.02017-12-27

v2.3.1 → v3.0b12022-06-18

PHP version history (4 changes)v1.2PHP &gt;=5.0.0

v1.3bPHP &gt;=5.3.0

v2.0PHP &gt;=5.4.0

v3.5PHP ^5.4 || ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/573f67023e7d41ccd0618b6732cc908e1a30f5d0df514b792b0ebc5379f9d659?d=identicon)[brad.kent](/maintainers/brad.kent)

---

Top Contributors

[![bkdotcom](https://avatars.githubusercontent.com/u/2137404?v=4)](https://github.com/bkdotcom "bkdotcom (1374 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (37 commits)")[![Ayesh](https://avatars.githubusercontent.com/u/811553?v=4)](https://github.com/Ayesh "Ayesh (1 commits)")

---

Tags

firephplogger-interfacemonologpsr3psr-3debugdebuggingwhoopsloggervar\_dumperrorhandlerinspectphp-debugbarfirephpChromeLoggerphpdebugconsole

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)[inpsyde/wonolog

Monolog-based logging package for WordPress.

183617.9k7](/packages/inpsyde-wonolog)[apix/log

Minimalist, thin and fast PSR-3 compliant (multi-bucket) logger.

511.0M18](/packages/apix-log)[bref/logger

All you need to log with Bref on AWS Lambda

331.5M8](/packages/bref-logger)[wa72/simplelogger

Wa72SimpleLogger is a collection of very simple loggers implementing \\Psr\\Log\\LoggerInterface (PSR-3)

13246.6k13](/packages/wa72-simplelogger)[markrogoyski/simplelog-php

Powerful PSR-3 logging. So easy, it's simple.

2818.1k4](/packages/markrogoyski-simplelog-php)

PHPackages © 2026

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