Categories: Laravel Application, Laravel Framework - The PHP Framework For Web Artisans

Laravel Debugbar A Must Have Debugbar For Your Laravel Application2 min read

Laravel Debugger by Barry vd. Heuvel
Reading Time: 2 minutes

Laravel Debugbar by Barry vd. Heuvel is a package which uses PHP Debug Bar with the Laravel. It quickly allows you to have all your queries and other development related stuff at your fingertips such that you can avoid n+1 loop of unwanted queries being running in the background. In a nutshell, it displays PHP information without using var_dump() in your code.

Barry Heuvel in his package has integrated PHP Debug Bar with the Laravel 5 and above versions. This include a serviceRegister which needs to be included to register the Laravel Debgger. It bootstraps some Collectors to work with Laravel and implements a couple of custom DataCollectors, specific for Laravel.

A Must Have Debugbar For Your Laravel Application

Laravel Debugbar
Laravel Debugbar

The Laravel Debugbar by default uses lots of collectors to display necessary information. Some of the collectors it includes are for :-

And the default collectors include:

  • PhpInfoCollector
  • MessagesCollector
  • TimeDataCollector (With Booting and Application timing)
  • MemoryCollector
  • ExceptionsCollector

It should be only used in the development mode because for the simple fact that it display critical information of your app along with that it makes your app a bit slow because it uses many collectors to collect information so if you Laravel App is loading slow try to disable some of the collectors.

Laravel Debugbar is very generic debugger and easy to implement in your project. It’s clean ,easy to use and fast interface makes it stands out from the crowd. It display Redirects and (jQuery) Ajax Requests which makes a lot of background things clear from a developer prospective.Along with this you can save and reopen previous requests as well. The client side of the Laravel Debgger is coded 100% in Javascript.

Look At :- Laravel Tutorials For Beginners Step By Step Guide – Part 1

In your Laravel 5 or above version project require the package:

Next open config/app.php and inside the ‘providers’ array add the following line:

If you want to add the facades add this to the ‘aliases’ array:

Now you can easily see all the stuff that Laravel Debugbar offers in the bottom part of  your Laravel App and enjoy the features of this awesome package.

Going Further

This post only contains the basic overview of the Laravel Debugbar it has many cool features that you can find here. It’s a must have debugger in my own opinion and i highly recommend this package for your next project or even in the present project as well.Its always a good practice to keep track of your Laravel App and see under the hood what actually is going on.

Cheers ! Happy Coding

All Rights Reserved @ Techanical-Atom
%d bloggers like this: