Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

timokfine's avatar

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.

0 likes
36 replies
connorhood's avatar

I am having the same issue. It worked before, but seems to not work after the latest Laravel upgrade.

SachinAgarwal's avatar

@tmartinco In config/debugbar.php, change 'enabled' property.

'enabled' => true,

p.s. Laravel framework is updated this morning.

7 likes
mm256's avatar

This doesnt solve my issue with Laravel 5.2 and I have done the same things as you all

Snapey's avatar

@Lij-EDI don't run optimize in development environments.

willvincent's avatar

Ensure APP_DEBUG=true in your .env

EDIT: I guess you already did that.. :\

cshelswell's avatar

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

jasonstubbs's avatar

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.

1 like
tamat's avatar

php artisan debugbar:clear, that fixed it for me.

2 likes
cshelswell's avatar

@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

beltashazzar's avatar

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.

kyrpas's avatar

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.

minaFaragAmin's avatar

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

2 likes
kianisanaullah's avatar

create folder in storage with name debugbar and give it 777 permission then run route:clear command once

Corndog's avatar

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!

ConorJohn's avatar

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!

carltondickson's avatar

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

2 likes
jicksonjohnson's avatar

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

kale's avatar

run php artisan route:clear

this will fix your issue

Shelen's avatar

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.

coedycode's avatar

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.