PHPackages                             akira/laravel-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. akira/laravel-debugger

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

akira/laravel-debugger
======================

Advanced debugging toolkit for Laravel 12+ built with PHP 8.4 features.

v1.4.0(2mo ago)42.9k↓18.8%115MITPHPPHP ^8.4CI passing

Since Oct 28Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/kidiatoliny/laravel-debugger)[ Packagist](https://packagist.org/packages/akira/laravel-debugger)[ GitHub Sponsors](https://github.com/kidiatoliny)[ RSS](/packages/akira-laravel-debugger/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (6)Dependencies (18)Versions (7)Used By (15)

[![img.png](docs/assets/banner.png)](docs/assets/banner.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5408264a70b2b8a4a13eec148f1059803e8a4dfc9f5cdb6cc4ed8ab70fb8278d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616b6972612f6c61726176656c2d64656275676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/akira/laravel-debugger)[![Total Downloads](https://camo.githubusercontent.com/1dee2e3c85183fc0aef687fe3085992a6f65b87d79a8ea9a721ea137ca923b91/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616b6972612f6c61726176656c2d64656275676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/akira/laravel-debugger)

**Advanced debugging toolkit for Laravel 12+ built with PHP 8.4 features.**

Akira Debugger is a modern, strictly-typed debugging package designed specifically for Laravel 12+ applications. Built from the ground up with PHP 8.4's latest features including strict types, readonly properties, and modern attributes.

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

[](#requirements)

- **PHP:** ^8.4
- **Laravel:** ^12.0
- **Dependencies:** See [composer.json](composer.json)

Features
--------

[](#features)

- **Laravel 12+ exclusive** - Built for the latest framework features
- **PHP 8.4 strict typing** - Full type safety throughout
- **Query debugging** - Monitor SQL queries, detect N+1, slow queries
- **Mail debugging** - Inspect sent emails and mailables
- **Event tracking** - Watch Laravel events as they fire
- **Job monitoring** - Track queued jobs and their execution
- **HTTP debugging** - Log HTTP client requests and responses
- **Cache monitoring** - Track cache hits, misses, and operations
- **View debugging** - Inspect rendered views and their data
- ️ **Exception tracking** - Catch and log exceptions with full context

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

[](#installation)

Install the package via Composer:

```
composer require akira/laravel-debugger --dev
```

The package will automatically register its service provider.

### Publish Configuration (Optional)

[](#publish-configuration-optional)

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

This creates `config/debugger.php` where you can customize watchers and behavior.

Quick Start
-----------

[](#quick-start)

### Basic Debugging

[](#basic-debugging)

The simplest way to debug with `ad()`:

```
// Debug a variable
ad($user);

// Debug with label
ad('Current User', $user);

// Debug and stop execution
debugAndDie($user);

// Debug multiple values
ad($user, $orders, $settings);
```

Learn more in [Basic Usage](docs/04-basic-usage.md).

Usage
-----

[](#usage)

### Query Debugging

[](#query-debugging)

Monitor database queries in real-time:

```
// Enable query logging
ad()->showQueries();

// Find slow queries (threshold in milliseconds)
ad()->slowQueries(100);

// Detect duplicate queries
ad()->showDuplicateQueries();

// Detect N+1 query problems
ad()->showConditionalQueries(function ($query) {
    return $query->toSql();
});
```

Learn more in [Query Debugging](docs/07-query-debugging.md).

### Event Monitoring

[](#event-monitoring)

Track Laravel events as they fire:

```
// Watch all events
ad()->showEvents();

// Get events info
ad()->events();
```

See [Event Debugging](docs/09-event-debugging.md) for details.

### Job Debugging

[](#job-debugging)

Monitor queued jobs and their execution:

```
// Monitor all job execution
ad()->showJobs();

// Get jobs info
ad()->jobs();
```

Read [Job Debugging](docs/10-job-debugging.md) for advanced usage.

### Mail Debugging

[](#mail-debugging)

Inspect sent emails without sending:

```
// Log all sent emails
ad()->showMails();

// Debug a mailable
ad()->mailable(new OrderConfirmation($order));
```

Details in [Mail Debugging](docs/08-mail-debugging.md).

### HTTP Debugging

[](#http-debugging)

Monitor HTTP client requests and responses:

```
// Track all HTTP requests
ad()->showHttpClientRequests();

// HTTP requests are automatically logged
$response = Http::get('https://api.example.com/users');
```

Learn more in [HTTP Debugging](docs/11-http-debugging.md).

### Cache Monitoring

[](#cache-monitoring)

Track cache operations:

```
// Monitor cache hits and misses
ad()->showCache();
```

See [Cache Debugging](docs/12-cache-debugging.md).

### View Debugging

[](#view-debugging)

Inspect rendered views and their data:

```
// Watch view rendering
ad()->showViews();
```

Read [View Debugging](docs/13-view-debugging.md).

### Commands

[](#commands)

```
# Clear debugger data
php artisan debugger:clean
```

Configuration
-------------

[](#configuration)

The `config/debugger.php` file allows you to:

- Enable/disable specific watchers
- Configure query thresholds
- Set up filters
- Customize output formats

Example configuration:

```
return [
    'enable' => env('DEBUGGER_ENABLED', env('APP_DEBUG', false)),

    'watchers' => [
        'queries' => true,
        'mails' => true,
        'events' => true,
        'jobs' => true,
        'cache' => true,
        'http' => true,
        'views' => true,
        'exceptions' => true,
    ],

    'query_threshold' => 100, // ms

    'ignored_events' => [
        // Events to ignore
    ],
];
```

Testing
-------

[](#testing)

Run the test suite:

```
composer test
```

Run tests with coverage:

```
composer test -- --coverage
```

Code Quality
------------

[](#code-quality)

### Format Code (Pint)

[](#format-code-pint)

```
composer format
```

### Static Analysis (Larastan)

[](#static-analysis-larastan)

```
composer analyse
```

### Refactor (Rector)

[](#refactor-rector)

```
composer refactor
```

Development
-----------

[](#development)

This package follows strict coding standards:

- **PSR-12** via Laravel Pint
- **Level Max** static analysis via Larastan
- **PHP 8.4+** features throughout
- **100% type coverage** with strict types
- **Pest** for testing

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

Built with inspiration from Spatie's Laravel Ray, reimagined for modern Laravel and PHP.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance84

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity57

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

Total

7

Last Release

83d ago

PHP version history (2 changes)v1.0.1PHP ^8.2|^8.3|^8.4

v1.1.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/c42e59ca0b3864a382dc0c3e290f8cf7d75bbe3eab10a3af0f71d5785f89d0bc?d=identicon)[kidiatoliny](/maintainers/kidiatoliny)

---

Top Contributors

[![kidiatoliny](https://avatars.githubusercontent.com/u/48266788?v=4)](https://github.com/kidiatoliny "kidiatoliny (55 commits)")

---

Tags

laravellaravel 12debugdebuggerphp 8.4akira

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-ray

Easily debug Laravel apps

31738.4M2.8k](/packages/spatie-laravel-ray)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k49.4M479](/packages/laravel-scout)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/pennant

A simple, lightweight library for managing feature flags.

57711.1M53](/packages/laravel-pennant)[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M56](/packages/timacdonald-log-fake)

PHPackages © 2026

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