# laravel-debugbar

> Debugbar for Laravel (Integrates PHP Debug Bar)

- Type: agent or tool
- Field: Code Review & Testing
- Repository: https://github.com/fruitcake/laravel-debugbar
- GitHub stars: 19303
- Licence: MIT
- Language: PHP
- Last push: 2026-10-28
- Page: https://imutechz.in/agents/laravel-debugbar

## What it is
A Laravel package that integrates PHP Debug Bar into a Laravel application. It registers a service provider, attaches the debugbar to output, and bootstraps collectors for queries, routes, views, events, logs, cache and more. It is intended for developers debugging Laravel apps during development, and it displays redirects and Ajax/Livewire requests in a dropdown.

## Features
- QueryCollector shows all queries with bindings and timing
- RouteCollector, ViewCollector and EventsCollector for request details
- LogsCollector, FilesCollector, ConfigCollector and CacheCollector, disabled by default
- Debugbar facade for logging messages, exceptions and timing
- Helper functions such as debug() and debugbar()
- Works out of the box with Laravel Octane in 4.x

## Best for
- Inspecting database queries and their timing during development
- Tracing routes, views and events in a Laravel request
- Logging custom messages and measuring code blocks
- Reviewing redirects and Ajax/Livewire requests

## Pros
- Includes custom collectors specific to Laravel
- Enabled automatically when APP DEBUG is true and environment is not production or testing
- Can be disabled via config or the DEBUGBAR ENABLED environment variable
- Provides a facade and helper functions for logging and timing

## Cons
- Must not be used on publicly accessible websites, as it leaks information from stored requests by design
- Can slow the application down because it gathers and renders data
- Only enabled when APP DEBUG is true and the environment is not production or testing

## Install
```
composer require fruitcake/laravel-debugbar --dev
```

## Usage
```
Debugbar::info($object);
```

Tags: laravel, debugbar, php, debugging, profiling, development, composer
