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.
Install & use
Install
composer require fruitcake/laravel-debugbar --dev
Usage
Debugbar::info($object);
fruitcake/laravel-debugbar is a third-party open-source project, listed here from public GitHub data. ImuTechz did not write it and has not reviewed or security-audited its code. Read the source and its permissions before you install or run it.
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