debugger.md 892 Bytes
Newer Older
1 2 3
Debug toolbar and debugger
==========================

4 5 6 7 8 9
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
--------------------------

docsolver committed
10 11 12
Add these lines to your config file:

```
13 14 15 16
'preload' => ['debug'],
'modules' => [
	'debug' => ['yii\debug\Module']
]
docsolver committed
17 18
```

19
**Watch out: by default the debug module only works when browsing the website from the localhost. If you want to use it
20 21 22 23 24 25 26 27 28 29 30
on a remote (staging) server, add the parameter allowedIPs to the config to whitelist your IP, e.g. :**

```
'preload' => ['debug'],
'modules' => [
	'debug' => [
		'class'=>'yii\debug\Module',
		'allowedIPs'=>['1.2.3.4', '127.0.0.1', '::1']
	]
]
```
31 32 33 34

How to use it
-------------

docsolver committed
35

36 37 38
Creating your own panels
------------------------