DEV Community

Cover image for Using the Debug Tool laravel-debugbar in Laravel
Kenta Takeuchi
Kenta Takeuchi

Posted on • Originally published at bmf-tech.com

Using the Debug Tool laravel-debugbar in Laravel

This article was originally published on bmf-tech.com.

Introducing the laravel-debugbar debug tool for Laravel.

github-laravel-debugbar

It works with both Laravel 5.1 and 5.2.

Screenshot 2016-06-27 0.12.17.png

Installing laravel-debugbar with composer

composer require barryvdh/laravel-debugbar --dev

then

composer install

Enabling with facade

While you can use it as a debug tool just by installing, it's convenient to enable it with a facade for more detailed debugging.

Specify the following in the provider and alias sections of app.php respectively.

  • Barryvdh\Debugbar\ServiceProvider
  • 'Debugbar' => Barryvdh\Debugbar\Facade::class

Trying it out

\Debugbar::error();
\Debugbar::disable();
Debugbar::startMeasure();
Debugbar::stopMeasure();

And many more.

Thoughts

It's very convenient (゜レ゜)

Top comments (0)