laravel-debugbar icon indicating copy to clipboard operation
laravel-debugbar copied to clipboard

After install not displaying - Laravel 9

Open metacraft-hq opened this issue 3 years ago • 16 comments

"laravel/framework": "^9.0", "php": "^8.0.2", "livewire/livewire": "^2.10", Breeze.

I always and forever have used barryvdh/laravel-debugbar with no issues ever.

I went the standard route of installing as per GITHUB REPO as i have done on countless projects.

This time the debug bar does not display.

I have run every possible *:clear / autodump CMD without success?

Please advice - Thank you.

image

metacraft-hq avatar Feb 20 '22 07:02 metacraft-hq

as per documentation:

the Debugbar will be enabled when APP_DEBUG is true.

Is in your .env file APP_DEBUG=true ?

hopkins385 avatar Feb 25 '22 18:02 hopkins385

I seem to have this too (having used debugbar easily before) - Windows 10, Laravel 9, PHP8.1, APP_DEBUG=true, clearing everything I can but can't get debugbar to appear

toby1kenobi avatar Apr 14 '22 09:04 toby1kenobi

as per documentation:

the Debugbar will be enabled when APP_DEBUG is true.

Is in your .env file APP_DEBUG=true ?

Yes, as I have mentioned.. I use this in all my projects with success.

1st : I install the debug bar, as per repo guide 2nd: .env => APP_DEBUG=true 3rd: refresh browser - and there it is 🙂

Please note, this only seems to occur on that specific project ??? Every other install is working.. so o copied the code (painful) into a new framework.. and all is well.

Thank you for your reply, sorry I didn't reply sooner.

metacraft-hq avatar Apr 14 '22 09:04 metacraft-hq

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.

stale[bot] avatar Jul 10 '22 10:07 stale[bot]

HI! I have an Aimeos shop installation ( the standalone version ). I installed this package and I set the .env variables as it was mentioned.

After restart, browser reopen, refresh, dump autoload I still can't see the debug bar.

I had simple laravel project without the Aimeos. It worked with that. ( But that was Laravel 8 not 9 as it is in the Aimeos project )

Any idea?

Wall0fDeath avatar Jul 19 '22 14:07 Wall0fDeath

This is happening to me too. I have been using it for many years. Just cant get it to work on Laravel 9. Laravel Version ........................................................................................................................... 9.22.1
PHP Version ................................................................................................................................ 8.1.8
Composer Version ........................................................................................................................... 2.3.3
Environment ................................................................................................................................ local
Debug Mode ............................................................................................................................... ENABLED

joelconty avatar Jul 27 '22 05:07 joelconty

I used Aimeos with Laravel 9 and it seems the debugbar had a problem with the CSP. It didn't show images and it blocked many inline scripts and the debugbar too.

I changed this default in the copy of base.blade.php:

<meta http-equiv="Content-Security-Policy" content="base-uri 'self'; default-src 'self' 'nonce-{{ app( 'aimeos.context' )->get()->nonce() }}'; {{ config( 'shop.csp.frontend', 'style-src \'unsafe-inline\' \'self\'; img-src \'self\' data: https://aimeos.org; frame-src https://www.youtube.com https://player.vimeo.com' ) }}">

To this for test:

<meta http-equiv="Content-Security-Policy" content="default-src *; font-src * data:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data:">
 

Everything started to work for me, even the debugbar.

This is not a solution, just a hint to where to start. Everyone must write his own CSP handling, this just removes most of the restrictions. :))

Have a nice day!

Wall0fDeath-Mithrandir avatar Jul 28 '22 06:07 Wall0fDeath-Mithrandir

For those who might be interested, I discovered what was my issue: In my routes/api.php I had a line for deactivating debugbar in my api endpoints, like this: \Debugbar::disable(); Up to laravel 8 this was fine.. It did not affect anything outside my api routes. But that changed in Laravel 9. So all i had to do in my routes/api.php was put the debugbar disable line inside the functions i had there , like this: Route::get('foo/bar', function(){ \Debugbar::disable(); return ApiController::getFoo(); });

joelconty avatar Aug 01 '22 04:08 joelconty

hi I had same issue and the solution for my case is create folder storage/debugbar and give it permissions after I create this folder the toolbar appear thanks

mgw2007 avatar Sep 30 '22 19:09 mgw2007

Also note that it may not show up due to CSP_ENABLED=true. Setting it to false (not recommended) did fix it for me.

luckydonald avatar Oct 06 '22 15:10 luckydonald

After install and config the extension, try it:

php artisan optimize

ciceromatias avatar Oct 30 '22 19:10 ciceromatias

Hi, I've just experience this same strange behavior - debugbar was not visible on local env after fresh install and after one hour of trying every advice I could find I find out it was blocked by Brave's (browser's) anti-trancking shield. I dunno why it was blocked. I just want to share this to maybe save someone some time in future :)

andrewvaca avatar Nov 13 '22 13:11 andrewvaca

After install and config the extension, try it:

php artisan optimize

This solution also works for me, for listed below components: "laravel/framework": "^9.2", "laravel/octane": "^1.2", "livewire/livewire": "^2.10", "barryvdh/laravel-debugbar": "^3.7",

beataburczyk avatar Nov 16 '22 18:11 beataburczyk

After install and config the extension, try it:

php artisan optimize

None of the solutions worked for me, this one did. Thank you.

gabriuss avatar May 18 '23 06:05 gabriuss

hi I had same issue and the solution for my case is create folder storage/debugbar and give it permissions after I create this folder the toolbar appear thanks

I had this issue on laravel 10 and this solution works for me, thanks @mgw2007

nafiesl avatar Oct 06 '23 03:10 nafiesl

After recent changes in the Debugbar package you need to set

`DEBUGBAR_ENABLED=true`

inside your .env file

makowskid avatar Oct 31 '23 15:10 makowskid