Reputation: 165
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?
Upvotes: 3
Views: 5643
Reputation: 123
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
Upvotes: 1
Reputation: 11
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.
Upvotes: 1