Skip to content

Debugbar

A developer toolbar for Laravel apps that shows queries, routes, views, logs and timing.fruitcake/laravel-debugbar

Stars
19.3k
Forks
1.6k
Licence
MIT
Language
PHP
Last update
9 days ago
Type
Library

What it is

Debugbar is a Laravel package that adds a debug toolbar to your web pages while you develop. It wraps the PHP Debug Bar library and shows details about each request, such as database queries, loaded views, routes, events, logs and timing. It is meant for local development only, since it can leak information if exposed publicly.

  • Inspect every SQL query on a page with its bindings and timing
  • Check which Laravel route handled the current request
  • Add custom debug messages and timers with the Debugbar facade or debug() helper
  • Review previous requests through the built-in storage browser on localhost

Great for

  • Laravel developers investigating slow pages or unexpected database queries
  • Developers who want to see which views, routes or events a request used
  • Teams debugging AJAX or Livewire requests in a local environment
  • Developers using Twig through TwigBridge who want debug helpers

Not ideal for

  • Production websites, because the README says it leaks information from stored requests by design
  • Apps that are already slow, since it adds overhead to gather and render data
  • Projects not built on Laravel, since it is a Laravel integration
Step-by-step guide: how to use DebugbarInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: PHP and Composer · A Laravel application

    Require the package for development

    composer require fruitcake/laravel-debugbar --dev

    Publish the package config (optional)

    php artisan vendor:publish --provider='Fruitcake\LaravelDebugbar\ServiceProvider'
  2. 2

    Run it

    • Install the package with Composer using the --dev flag
    • Make sure APP_DEBUG is true and the environment is not production or testing
    • Load any page in your browser and look for the toolbar
    • Adjust collectors or enabled state in config/debugbar.php if needed
  3. 3

    Get the most out of it

    • Disable slow collectors in config/debugbar.php when pages feel sluggish
    • Use Debugbar::addMessage, startMeasure/stopMeasure and addThrowable to log custom data
    • Use the debug() helper or collect()->debug() to dump values into the message collector
    • Enable the optional LaravelCollector, ConfigCollector or CacheCollector if you need version, config or cache details
    • Read the php-debugbar documentation linked in the README for rendering and more options

Downloads

Strengths

  • Installs with Composer and is auto-discovered by Laravel, so little manual wiring is needed
  • Many collectors can be turned on or off in the config to reduce overhead
  • Works with Octane according to the README and supports AJAX and Livewire requests

Trade-offs

  • The README warns it can slow the application down and it should not run on public sites
  • Storage browsing is limited by default to localhost or private networks and must be secured if changed
  • Some features depend on specific Laravel or TwigBridge versions, such as TwigBridge 0.6.x testing noted in the README

How it compares

ProjectStarsTypeLevelUpdatedBest for
laravel-debugbar (this)19.3kLibrarybeginner9 days agoLaravel developers investigating slow pages or unexpected database queries
filament32.4kLibraryintermediate4 days agoLaravel developers building internal admin panels
ui127kLibraryintermediate4 days agoDevelopers building React or Next.js interfaces who want full control over component code
laravel-ide-helper15kDev toolbeginner2 months agoLaravel developers who use an IDE such as PhpStorm or VS Code and want better autocompletion
sage13.3kFrameworkintermediate29 days agoDevelopers building custom WordPress themes
voyager11.8kLibraryintermediate1.7 years agoDevelopers maintaining an existing Laravel 8+ app that already uses Voyager

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.