mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-18 17:21:26 +08:00

I wasted >1h trying to find out why the debug bar was not shown on my remote staging server. Hopefully this will help other people avoid this mistake...
27 lines
765 B
Markdown
27 lines
765 B
Markdown
Debug toolbar and debugger
|
|
==========================
|
|
|
|
Yii2 includes a handy toolbar to aid faster development and debugging as well as debugger. Toolbar displays information
|
|
about currently opened page while using debugger you can analyze data collected before.
|
|
|
|
Installing and configuring
|
|
--------------------------
|
|
|
|
How to use it
|
|
-------------
|
|
|
|
Add these lines to your config file:
|
|
|
|
```
|
|
'preload' => ['debug'],
|
|
'modules' => [
|
|
'debug' => ['yii\debug\Module']
|
|
]
|
|
```
|
|
|
|
**Watch out: by default the debug module only works when browsing the website from the localhost. If you want to use it on a remote (staging) server, add the parameter allowedIPs to the config to whitelist your IP.**
|
|
|
|
Creating your own panels
|
|
------------------------
|
|
|