Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Debugbar

Laravel Debugbar Laravel Package

fruitcake/laravel-debugbar

Integrate PHP Debug Bar into Laravel to inspect requests in real time. Shows executed queries, routes, views, logs, cache/events, and timing/memory metrics with an in-browser toolbar and detailed panels. Great for profiling and debugging during development.

View on GitHub
Deep Wiki
Context7

PHP Debugbar integration for Laravel

Frequently asked questions about Laravel Debugbar
How do I install and enable Laravel Debugbar in a Laravel 10 project?
Run `composer require fruitcake/laravel-debugbar`, then add the middleware to your `app/Http/Kernel.php` under the `web` middleware group. Publish the config with `php artisan vendor:publish --tag=debugbar-config` and ensure `APP_DEBUG=true` in your `.env`. The toolbar will auto-appear in local development.
Which Laravel versions does this package officially support?
The package supports Laravel 8.x, 9.x, and 10.x. For Laravel 11, check the GitHub issues or release notes for compatibility updates, as newer Laravel versions may require minor adjustments due to changes in the framework’s internals.
Can I disable specific collectors (e.g., queries or logs) to reduce performance overhead?
Yes, use the `debugbar.php` config file to enable or disable collectors individually. For example, set `'collectors' => ['queries' => false, 'logs' => true]` to disable query logging while keeping logs active. This is ideal for balancing detail and performance.
How do I prevent Debugbar from showing in production or staging environments?
The package respects Laravel’s `APP_ENV` setting. By default, it only loads in `local` environments. For extra safety, add `debugbar()->disable()` in your `AppServiceProvider` or use middleware to block access via IP whitelisting in `debugbar.php`.
Does Laravel Debugbar work with Livewire components, and how do I debug them?
Yes, the package includes a dedicated Livewire collector. Debugbar will automatically log Livewire component interactions, including property changes and method calls. Use `debugbar()->info('Livewire event', $data)` to manually log custom events.
Will enabling Debugbar slow down my Laravel application in development?
Debugbar adds minimal overhead when collectors are enabled. To mitigate this, set `soft_limit` and `hard_limit` in the config to cap the number of logged queries or events. For example, `soft_limit=50` and `hard_limit=200` balance detail and performance.
Can I use Debugbar to debug API routes or only web routes?
Debugbar works for both web and API routes. For API routes, ensure the middleware is included in the `api` group in `Kernel.php`. The toolbar will appear in browser requests, but you can also manually trigger Debugbar via `debugbar()->enable()` in controller methods.
How do I customize or create a new collector for third-party packages?
Extend the `DataCollector` interface to create custom collectors. Study the existing collectors (e.g., `QueryCollector`, `LogCollector`) in the package’s `src/Collectors` directory. Override methods like `collect()` to log your package’s data, then register it in the config.
Does Debugbar interfere with Laravel’s built-in error pages or logging?
No, Debugbar operates alongside Laravel’s error handling. It logs exceptions separately and won’t replace the default error pages. However, ensure `APP_DEBUG=true` is set to see the toolbar, as Debugbar respects Laravel’s debug mode.
Are there alternatives to Laravel Debugbar for debugging in Laravel?
Alternatives include Laravel Telescope (for production debugging), Laravel IDE Helper (for code completion), and Xdebug with PHPStorm. However, Debugbar is unique for its in-browser toolbar and lightweight integration with Laravel’s core features like queries, logs, and Livewire.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai