PHPackages                             ghostff/dbug - 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. ghostff/dbug

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

ghostff/dbug
============

A very lightweight Error/Exception handler for PHP

v1.0.1(8y ago)9562[1 issues](https://github.com/Ghostff/Dbug/issues)BSDHTMLPHP &gt;=7.0.0

Since Jul 8Pushed 6y ago2 watchersCompare

[ Source](https://github.com/Ghostff/Dbug)[ Packagist](https://packagist.org/packages/ghostff/dbug)[ RSS](/packages/ghostff-dbug/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Dbug a \*very lightweight Error/Exception handler for PHP(7+)
=============================================================

[](#dbug-a-very-lightweight-errorexception-handler-for-php7)

[![Latest Stable Version](https://camo.githubusercontent.com/2ae03a0c3ce923ad0b26f3256b4c2b2ca5c213f93d2cef7d3a5734f1e250716d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d76312e302e302d627269676874677265656e2e737667)](https://github.com/Ghostff/Text_Tables_Generator/releases) [![License](https://camo.githubusercontent.com/c3b4b717b46fd5ac406af2407c849286898be07f8a19516401b66d4855b51757/68747470733a2f2f696d672e736869656c64732e696f2f707970692f6c2f446a616e676f2e737667)](https://camo.githubusercontent.com/c3b4b717b46fd5ac406af2407c849286898be07f8a19516401b66d4855b51757/68747470733a2f2f696d672e736869656c64732e696f2f707970692f6c2f446a616e676f2e737667) [![Latest Stable Version](https://camo.githubusercontent.com/3f6525a16eee5c5b466ad2849a68521479f398a1c4180ca6520e294fc16758bc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76352e352e342d626c75652e737667)](https://packagist.org/packages/ghostff/text-tables-generator) [![Minimum PHP Version](https://camo.githubusercontent.com/5c3072425e67297c8ef63d17acd2c86a0d2ef324f19249f2280bd7de902f63a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e302d3838393242462e737667)](http://php.net/releases/7_0_0.php)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#---)

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

[](#installation)

You can download the Latest [release version ](https://github.com/Ghostff/Dbug/releases/) as a standalone, alternatively you can use [Composer](https://getcomposer.org/)

```
$ composer require ghostff/dbug
```

```
"require": {
    "ghostff/dbug": "^1.0"
}
```

Basic usage:

```
use Dbug\BittrDbug;

/**
 * @param error handle type
 * @param theme name (bittr|default|yola). Themes can be configures in theme.json
 * @param lines of code to cover before and after the error.
 */
new BittrDbug(BittrDbug::PRETTIFY, 'yola', 20);
#This should be implemented before any other script execution except your autoloader(if using one).
```

Error/Exception Display: [![Screenshot](demo.png)](demo.png)

Using callback function:

```
use Dbug\BittrDbug;

new BittrDbug(function (BittrDbug $e) {
    var_dump(
        $e->getMessage();  # returns string;
        $e->getCode();  # returns int;
        $e->getFile();  # returns string;
        $e->getLine();  # returns int;
        $e->getTrace();  # returns array;
        $e->getTraceAsString();  # returns string;
    );
});
#This should be implemented before any other script execution except your autoloader(if using one).
```

You can also log errors instead of outputting them in browser:

```
use Dbug\BittrDbug;

/**
 * @param error handle type
 * @param path to save log files.
 */
new BittrDbug(BittrDbug::FILE_LOG, 'path/to/my/log/');
#This should be implemented before any other script execution except your autoloader(if using one).
```

For file logging, you can set your `path` to a directory outside your webroot or maybe add a `.htaccess` to prevent direct access to your log directory.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3145d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15882122?v=4)[ghostff](/maintainers/Ghostff)[@Ghostff](https://github.com/Ghostff)

---

Top Contributors

[![Ghostff](https://avatars.githubusercontent.com/u/15882122?v=4)](https://github.com/Ghostff "Ghostff (74 commits)")

---

Tags

callbacksdebuggererror-handlingexception-handlerfile-logsphp7error-reportingerrorerror handlingexception handlererror\_logdebuger

### Embed Badge

![Health badge](/badges/ghostff-dbug/health.svg)

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

###  Alternatives

[filp/whoops

php error handling for cool kids

13.2k402.4M1.4k](/packages/filp-whoops)[facade/ignition

A beautiful error page for Laravel applications.

2.1k102.2M333](/packages/facade-ignition)[spatie/laravel-ignition

A beautiful error page for Laravel applications.

566146.7M471](/packages/spatie-laravel-ignition)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388283.0k3](/packages/recca0120-laravel-tracy)[rarst/wps

WordPress plugin for whoops error handler.

129133.2k3](/packages/rarst-wps)

PHPackages © 2026

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