I am having the same issue. It worked before, but seems to not work after the latest Laravel upgrade.
Laravel Debugbar not showing?
I've installed Barry vd. Heuvel's Laravel 5.0 Debugbar.
Up until this morning it was working perfectly. It has since disappeared.
Couple of points:
- APP_DEBUG=true in my .env file
- Package has been added as both a Service Provider and a Facade
- I have published the config file debugbar.php for the package
Is there anything I could have missed?
Thanks in advance.
@connorhood use this php artisan route:clear
I've submitted an issue here: https://github.com/barryvdh/laravel-debugbar/issues/319
Let's see if anyone replies!
@tmartinco In config/debugbar.php, change 'enabled' property.
'enabled' => true,
p.s. Laravel framework is updated this morning.
The issue was related to this: https://github.com/barryvdh/laravel-debugbar/pull/287
This doesnt solve my issue with Laravel 5.2 and I have done the same things as you all
@mm256 I'm having the same problem. Since 5.2 it's completely gone
@cshelswell I restarted everything and it worked
@mm256 hmm I'm on homestead. The box has been restarted heaps and still nothing.
@cshelswell same here.. I donno what else to say
php artisan route:clear
Did the trick for me
@MauriceHofman thanks, php artisan optimize
@MauriceHofman works like magic
@MauriceHofman Can confirm this is still a viable solution in Laravel 10
@Lij-EDI don't run optimize in development environments.
Thanks @mahowebdesign tried that one already :) In fact I don't think there's a lot I haven't tried.
Ensure APP_DEBUG=true in your .env
EDIT: I guess you already did that.. :\
@willvincent haha yep that's already on :)
The issue for me is that is breaks when the config is cached. https://github.com/barryvdh/laravel-debugbar/issues/393
This makes it work: php artisan cache:clear
This breaks it again: php artisan config:cache
Yeah that's something I've tried already. I did give the suggestion
if ($this->app->environment() === 'local' && php_sapi_name() !== 'cli') {
$this->app['config']->set('debugbar.enabled', env('DEBUGBAR', false));
}
mentioned in the github post but even that didn't work
mkdir storage/debugbar && chown 777 storage/debugbar ?
I noticed 'local.ERROR: Debugbar exception: mkdir(): Permission denied' in my storage/logs/laravel.log and traced it to back to an attempt to create the directory above. The path itself is configured in config/debugbar.php in the storage.path key. Actually, it looks like the whole storage directory should be writable by the web server...
Anyway, that fixed it for me.
php artisan debugbar:clear, that fixed it for me.
@tamat a combination of that and the fact that I'd cached the routes on my homestead box sorted it so I just had to do a route clear:cache too :)
Also come to think of it I think there was a bit of code somewhere I had to fix. I think it might have been over an upgrade from 5.1 to 5.2 unfortunately I can't quite remember that bit
I ran into a similar situation and after trying the relevant things on this post (I'm running 5.2) I discovered that the app was throwing an error related to a resource route that apparently interrupted the debugbar service. Once I fixed that unrelated resource route issue debugbar loaded successfully.
php artisan cache:clear will fix it
None of the suggestions worked for me.
The issue was with an older Laravel 5.4 project, using Debugbar 2.4. The bar was only working when I wasn't logged in.
Eventually, I realised the issue was caused by my dates on the User model.
I had a protected $dates = ['created_at', 'updated_at', 'dob']; attribute.
I was also overriding the dob getter and setter on the model using getDobAttribute($value) and setDobAttribute($value) functions.
Debugbar didn't like this and was throwing Debugbar exception: Trailing data errors in the log. Actually, I didn't like it either, and I'll probably remove the custom functions. However, debugbar worked when I commented out the $dates attribute and/or the getter/setter functions.
Hope that helps someone.. it was unexpected and I wasted quite some time figuring it out.
for me
i run
1- php artisan route:clear 2- php artisan cache:clear 3- php artisan config:clear 4- php artisan config:cache
and got it work fine after that
create folder in storage with name debugbar and give it 777 permission then run route:clear command once
@ekxf8gc4omvklxz Make sure you don't have \Debugbar::disable(); in AppServiceProvider.php
Mine wasn't showing up for quite a while either - I realised that my APP_ENV variable was set to 'testing', rather than local. This fixed the issue for me!
Hey guys, this worked for me when trying to fix a routes issue, but php artisan cache:clear and php artisan route:clear
worked for me, I only include the route command because I was sure I already tried clearing the cache. Anyway, hope this helps someone!
I'm using Heroku and one thing that caught me out was that the dev dependencies were not being installed. On a Heroku deploy the following command is run
composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction
So if you have some sort of automated deployments in place, double check that composer install is installing dev dependencies too.
At the moment it feels like the only workaround is to move the dependency to require and then ensure APP_DEBUG=false and DEBUGBAR_ENABLED=false
What I found is something similar. I found the debugbar stopped working when I ran following.
composer install --optimize-autoloader --no-dev
In this case, the Debugbar wont show even the APP_ENV is local or anything other than production. I believe only marking APP_ENV as local is enough to activate debugbar.
What I did here, by executing following.
composer install and php artisan route:cache
run php artisan route:clear
this will fix your issue
One more case:
If you install your laravel not in the root, but in subfolder, e.g. subfolder
Modify in config/debugbar.php (even if you use APP_DIR in .env):
'route_prefix' => 'subfolder/_debugbar',
and then do
php artisan cache:clear; php artisan route:clear; php artisan config:clear; php artisan view:clear
Work for me.
For anyone working with an SPA, if you see the debugbar appear then disappear, make sure you're not mounting the vue app directly into the body element.
Please or to participate in this conversation.