Yii2: debug toolbar not showing

I find Yii2 debug toolbar is extremely useful. It can help you a lot in understanding what’s going under the hood of your application, how the framework behaves and flows without using xdebug or similar tools.

In the last weeks I had to replace my Macbook Pro which went for repair, so I was using a spare computer. Despite it being very fast some app were loading slowly, and I wanted to dig into the queries to see if I had done some mistakes, but I found out the debug toolbar was not showing up! How come?!After digging into the source of the toolbar controller I found out the classic *nix problem: filesystem permissions!

The culprit is the runtime/debug directory. Since I develop in my homefolder, and my /var/www/ has a symlink to it, I somehow need to let the www-data user to access and write files in my home.

All I had to do is to allow writing to the directory, and check the file index.data inside was writable as well.

After this I had my debug toolbar back!

Un pensiero su “Yii2: debug toolbar not showing

  1. Hello. I have the same problem. i can’t see the Debug Toolbar in my custom testing environment. The component is added in main-local and is set to true. where am i going wrong? what file permissions do i need to change? please help. Thank you!

Lascia un commento

Il tuo indirizzo email non sarà pubblicato.

Solve : *
14 + 26 =


Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.