Laravel-debugbar: Debugbar is not displaying in Laravel 5

Created on 19 Mar 2015  路  28Comments  路  Source: barryvdh/laravel-debugbar

I thought this was a Laravel 5.0.16 issue, however I've tested with a fresh install of 5.0.1 with the same results as below. I have a few projects created I believe with 5.0.12, where the debugbar was working. They have been updated to 5.0.16 and still display the debugbar. However new projects are not showing the debugbar.

Testing with a fresh install of Laravel 5.0.16
composer create-project laravel/laravel --prefer-dist
composer require barryvdh/laravel-debugbar

Added to config/app.php
'Barryvdh\Debugbar\ServiceProvider',
'Debugbar' => 'Barryvdh\Debugbar\Facade',

php artisan vendor:publish successfully creates config/debugbar.php

stat -c %a storage/ returns 777

.env
APP_ENV=local
APP_DEBUG=true

The Laravel 5 welcome screen is displayed, however the debugbar is not. Checking view source shows that the debugbar code has been added to the page. The following assets return a 404.
/_debugbar/assets/stylesheets?1426726547
/_debugbar/assets/javascript?1426726547

Most helpful comment

Fuck, never mind. I solved my issue by doing php artisan config:clear

All 28 comments

What kind of error do you get on those assets? Do you have a catch all route?

Both assets return a 404 not found error. There are no catch all routes. This is a fresh install of L5, the only customization was adding debugbar, everything else is in a default state.

I'm dealing with the same issue on L5, set the debug to true and no debug is shown for example on a non-existing route... And gives me 404 no data to display.

Same problem for me. Fresh install of Laravel, just one route for '/' but the debug bar doesn't load.

Fuck, never mind. I solved my issue by doing php artisan config:clear

Hi.
If problem on your's Linux OS with Apache, check working mod_rewrite or didn't.
Then sudo a2enmod rewrite
For me fix the issues with 404 for assets debugbar.

Unfortunately php artisan config:clear didn't resolve my issue, and I've verified that rewrite is enabled.

I've tested on two systems, both using https://github.com/bryannielsen/Laravel4-Vagrant - Ubuntu 12.04 with PHP 5.5.12 and Apache 2.4.6. Both load the welcome page, but fail to load the debugbar assets of a fresh Laravel 5 project. As far as I can recall, my vagrant VM hasn't changed. Laravel 5 projects created weeks ago still load the debugbar, only new projects fail.

I've decided to migrate to Homestead. Testing with a fresh install of Laravel 5.0.16 displays the debugbar, and so do my previously created projects.

It was most likely the L5 routing cache.

I was having the same problem, artisan route:list didn't show the routes even though everything was registered properly. Perhaps this should be added to the readme @barryvdh ?

I'm running Laravel 5.0.25 as a standalone (using php -S as a server). I was having the same problems as @Daem0nX, i.e., 404 on the assets. I tried a php artisan route:clear as @syphernl suggested and I still got 404. So I decided to try all of the clear commands:

php artisan route:clear
php artisan cache:clear
php artisan debugbar:clear //likely not necessary since it returned "No Debugbar Storage found.."
php artisan config:clear

Refreshed and all was good. Since I had already tried route:clear and debugbar:clear did nothing, it seems to come down to cache:clear or config:clear, in my case anyway.

I'm running Laravel 5 and I was having the same problems. It is working on Windows and when I transfer it on my Ubuntu laptop it is now stop working. I already tried the above solution but still it is not working. I checked on the /storage/debugbar/ and the generated file is in this permission: -rw-r--r--.
Anyone?

It's now working, it is the apache2 setup/configuration. Need to enable the mod_rewrite and read the .htaccess file.

Same issue exists.

Same issue exists.

Same issue exists.

Same issue exists.

So all you guys aren't caching the routes/config, not catch-all routes? And you get a 404 error on the assets?
The links to assets are created in the HTML? And you do get an Laravel 404 (not apache/nginx?)

I try this commands:

php artisan cache:clear && php artisan clear-compiled && php artisan view:clear && php artisan route:clear && php artisan config:clear && php artisan debugbar:clear && composer dump && php artisan route:cache

And I tried 2.1 and 2.2 with laravel 5.2
sometimes there is just nothing, debugbar add nothing to response, sometimes 404 and js error
/_debugbar/assets/stylesheets?1426726547
/_debugbar/assets/javascript?1426726547
PhpdebugBar not defined
$ not defined

My route:
php artisan route:list
+--------+----------+-----+------+-------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+-----+------+-------------------------------------------+------------+
| | GET|HEAD | / | | App\Http\Controllers\HomeController@index | |
+--------+----------+-----+------+-------------------------------------------+------------+

Also with the latest dev version?

dev-master working

You could better use ^2.2@dev instead of dev-master. But I've tagged a new release (v2.2.1), so should be good in a couple of minutes.
Can the rest verify this works?

thanks
I checked my nginx config, sorry I lost this:

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

That's the reason why I got 404 errors.

I'll try 2.2.1 when it avaliable

I was facing the same error, what I did on production is cleared cache:

php artisan route:clear
php artisan config:clear

I was on L5.2 and these commands save me after lot of googling. Hope this helps.

Adding :
location / {
try_files $uri $uri/ /index.php?$query_string;
}
solved my problem too.
I am using Laravel 5.4

@maxi032 thanks a lot

this solves on mine

touch storage/oauth-public.key

Same issue for me. L5.5 fresh install, no catch all. I forgot toenable mod_rewrite when setting the VPS up

This comment reminded me: https://github.com/barryvdh/laravel-debugbar/issues/313#issuecomment-84051428

Thank You

tried everything mentioned above, still not working.
I am using laravel 5.4 and debugbar ~2.4.

@maxi032 thank You, this helped to me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lozadaOmr picture lozadaOmr  路  6Comments

alphametric picture alphametric  路  5Comments

hussein-elhussein picture hussein-elhussein  路  3Comments

beneverard picture beneverard  路  6Comments

MRZ2017 picture MRZ2017  路  3Comments