In this episode, we're diving into one of the must-have dev tools for Laravel: the Laravel Debugbar. We start off by installing it (super straightforward—just follow the composer instructions and you're ready to go), and once that's done, you'll notice a slick new bar popping up at the bottom of your browser when you reload your project.
We'll take a tour of the Debugbar and look at some of its most useful panels, like the queries tab (where you can instantly see all the database queries being executed) and keep an eye on important metrics like memory usage and request duration. This is super helpful to spot things like N+1 query problems, which we mention we'll get deeper into next time.
We also touch on how you can check request duration through your browser's developer tools, but for the bulk of this course, we'll mostly work with Debugbar since it gives you a really clear picture right away.
As a quick best practice, you'll learn how to disable the Debugbar when needed (like in your staging or testing environments), and we point out that it's only installed as a dev dependency for safety—so it doesn't run in production.
By the end of this episode, you'll be comfortable installing and exploring Debugbar and you'll see just how many queries are running in your app right now. Next up, we're going to actually fix the "lots of queries" issue by looking at eager loading!