Laravel Debugbar Not Showing

4.2k Views Asked by At

I have a project with Laravel version 7.28. I run

composer require barryvdh/laravel-debugbar --dev, 

After that I added Barryvdh\Debugbar\ServiceProvider::class to app/config.php under providers and added

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

to app/config.php under aliases. Then I run

php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"

Even though APP_DEBUG in .env is true and I terminated and rerun the app debugbar is not showing. Where did I make my mistake?

2

There are 2 best solutions below

0
On

I checked the config/debugbar.php, I see the new key DEBUGBAR_ENABLED with default is false. Then add it to .env file: DEBUGBAR_ENABLED=true

0
On

Make sure you are running on right port. I had php backend (running on port 8000) and react frontend (running on port 3000) and I did everything you have described above but it never worked. The issue I had was that I was checking if the debugbar showed up on port 3000 (which it never did sadly). I went to check on port 8000 and the debugbar was sitting there the whole time.

I didn't end up using the php debugbar because I think it only works if your frontend code is written in php (though not 100% sure).

I ended up debugging using postman. It doesn't have all the functionalities that the debugbar offers but it is a great tool to use if you just want to do basic debugging.