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

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

bitl/debug
==========

BitL Debug Integration - Send errors, dumps, and queries to BitL's debug bar

v0.1.5(3mo ago)03MITPHPPHP ^8.1CI passing

Since Feb 6Pushed 3mo agoCompare

[ Source](https://github.com/mur-run/bitl-debug-php)[ Packagist](https://packagist.org/packages/bitl/debug)[ RSS](/packages/bitl-debug/feed)WikiDiscussions main Synced 1mo ago

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

BitL Debug
==========

[](#bitl-debug)

Send PHP errors, dumps, and queries to BitL's debug bar.

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

[](#requirements)

- PHP 8.1+
- BitL desktop app running

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

[](#installation)

```
composer require bitl/debug --dev
```

For Laravel, the service provider is auto-discovered.

Usage
-----

[](#usage)

### Dump Variables

[](#dump-variables)

```
use BitL\Debug\BitL;

// Send a dump to BitL
BitL::dump($user);

// Or use the helper functions
bd($user);           // BitL Dump
bdd($user);          // BitL Dump and Die
bitl_dump($user);    // Explicit function name
```

### Manual Error Reporting

[](#manual-error-reporting)

```
try {
    // ...
} catch (\Exception $e) {
    BitL::error($e);
    throw $e;
}
```

### Manual Query Logging

[](#manual-query-logging)

```
BitL::query(
    sql: 'SELECT * FROM users WHERE id = ?',
    bindings: [1],
    time: 2.5,  // milliseconds
    connection: 'mysql'
);
```

### Manual Mail Capture

[](#manual-mail-capture)

```
BitL::mail(
    from: 'noreply@example.com',
    to: ['user@example.com'],
    subject: 'Welcome!',
    html: 'Hello World',
    text: 'Hello World'
);
```

Laravel Integration
-------------------

[](#laravel-integration)

The package auto-discovers in Laravel and automatically:

- Logs all database queries
- Captures outgoing mail

### Exception Capturing (Laravel 11+)

[](#exception-capturing-laravel-11)

For Laravel 11+, add exception reporting in `bootstrap/app.php`:

```
->withExceptions(function (Exceptions $exceptions) {
    $exceptions->reportable(function (\Throwable $e) {
        if (class_exists(\BitL\Debug\BitL::class)) {
            \BitL\Debug\BitL::error($e);
        }
        return false;
    });
})
```

### Exception Capturing (Laravel 8-10)

[](#exception-capturing-laravel-8-10)

For Laravel 8-10, add to `app/Exceptions/Handler.php`:

```
public function register(): void
{
    $this->reportable(function (\Throwable $e) {
        \BitL\Debug\BitL::error($e);
        return false;
    });
}
```

### Configuration

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=bitl-config
```

Or use environment variables:

```
BITL_HOST=127.0.0.1
BITL_PORT=8765
BITL_CAPTURE_ERRORS=true
BITL_CAPTURE_QUERIES=true
BITL_CAPTURE_MAIL=true
```

Non-Laravel Usage
-----------------

[](#non-laravel-usage)

For non-Laravel PHP projects, register the error handler manually:

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

use BitL\Debug\BitL;

// Register error and exception handlers
BitL::register();

// Your code...
```

Disabling in Production
-----------------------

[](#disabling-in-production)

The Laravel integration automatically disables in non-local environments.

For manual control:

```
use BitL\Debug\BitL;

if (getenv('APP_ENV') === 'production') {
    BitL::disable();
}
```

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance81

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Total

6

Last Release

101d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6bf654bb0f7cbc0aca7dd27990a5b41cc0be1856120596e3edf84aaa46716b9?d=identicon)[David Chang](/maintainers/David%20Chang)

---

Top Contributors

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

---

Tags

laraveldebugdumperror handlingbitl

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k124.3M624](/packages/barryvdh-laravel-debugbar)[kint-php/kint

Kint - Advanced PHP dumper

2.8k19.3M283](/packages/kint-php-kint)[lsrur/inspector

Laravel Inspector, debugging and profiling tools for Web Artisans

23441.1k](/packages/lsrur-inspector)[leeoniya/dump-r

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

12368.1k5](/packages/leeoniya-dump-r)[awesomite/var-dumper

The alternative for var\_dump function

1015.4k2](/packages/awesomite-var-dumper)

PHPackages © 2026

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