Debugging using Laravel Debugbar

Laravel Debugbar is useful for debugging your laravel application. It displays a debug bar in the browser with information from laravel.

The best part of debugbar is “Queries” tab. It displays how many queries are fired, so you can reduce extra queries or even check n + 1 problem occur while retrieving records.


1) Laravel Installation

2) Laravel Debugbar Installation

3) Add the Service provider to the providers array in config/app.php

4) Add this to your aliases array in config/app.php


1) Queries

Let’s use our default laravel migration.

Use User model:

queries tab

2) Messages

You can add debug messages in this tab.

messages tab

3) Timeline

Let’s add some records in user table using factory.

now check the start and stop time.

timeline tag

4) Exceptions

This tab displays exceptions.

exceptions tab


That’s it.

1 thought on “Debugging using Laravel Debugbar

Leave a Comment