Skip to content

Commit 49325b3

Browse files
committed
安装好debugger
1 parent 23d5e9b commit 49325b3

File tree

4 files changed

+295
-3
lines changed

4 files changed

+295
-3
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"type": "project",
77
"require": {
88
"php": ">=5.6.4",
9-
"laravel/framework": "5.3.*"
9+
"laravel/framework": "5.3.*",
10+
"barryvdh/laravel-debugbar": "^2.3"
1011
},
1112
"require-dev": {
1213
"fzaninotto/faker": "~1.4",

composer.lock

Lines changed: 117 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/app.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@
178178
App\Providers\EventServiceProvider::class,
179179
App\Providers\RouteServiceProvider::class,
180180

181+
182+
//第三方
183+
184+
Barryvdh\Debugbar\ServiceProvider::class,
185+
181186
],
182187

183188
/*
@@ -225,6 +230,7 @@
225230
'URL' => Illuminate\Support\Facades\URL::class,
226231
'Validator' => Illuminate\Support\Facades\Validator::class,
227232
'View' => Illuminate\Support\Facades\View::class,
233+
'Debugbar' => Barryvdh\Debugbar\Facade::class,
228234

229235
],
230236

config/debugbar.php

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Debugbar Settings
8+
|--------------------------------------------------------------------------
9+
|
10+
| Debugbar is enabled by default, when debug is set to true in app.php.
11+
| You can override the value by setting enable to true or false instead of null.
12+
|
13+
*/
14+
15+
'enabled' => null,
16+
17+
/*
18+
|--------------------------------------------------------------------------
19+
| Storage settings
20+
|--------------------------------------------------------------------------
21+
|
22+
| DebugBar stores data for session/ajax requests.
23+
| You can disable this, so the debugbar stores data in headers/session,
24+
| but this can cause problems with large data collectors.
25+
| By default, file storage (in the storage folder) is used. Redis and PDO
26+
| can also be used. For PDO, run the package migrations first.
27+
|
28+
*/
29+
'storage' => [
30+
'enabled' => true,
31+
'driver' => 'file', // redis, file, pdo, custom
32+
'path' => storage_path('debugbar'), // For file driver
33+
'connection' => null, // Leave null for default connection (Redis/PDO)
34+
'provider' => '' // Instance of StorageInterface for custom driver
35+
],
36+
37+
/*
38+
|--------------------------------------------------------------------------
39+
| Vendors
40+
|--------------------------------------------------------------------------
41+
|
42+
| Vendor files are included by default, but can be set to false.
43+
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
44+
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
45+
| and for js: jquery and and highlight.js
46+
| So if you want syntax highlighting, set it to true.
47+
| jQuery is set to not conflict with existing jQuery scripts.
48+
|
49+
*/
50+
51+
'include_vendors' => true,
52+
53+
/*
54+
|--------------------------------------------------------------------------
55+
| Capture Ajax Requests
56+
|--------------------------------------------------------------------------
57+
|
58+
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
59+
| you can use this option to disable sending the data through the headers.
60+
|
61+
*/
62+
63+
'capture_ajax' => true,
64+
65+
/*
66+
|--------------------------------------------------------------------------
67+
| Clockwork integration
68+
|--------------------------------------------------------------------------
69+
|
70+
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
71+
| Extension, without the server-side code. It uses Debugbar collectors instead.
72+
|
73+
*/
74+
'clockwork' => false,
75+
76+
/*
77+
|--------------------------------------------------------------------------
78+
| DataCollectors
79+
|--------------------------------------------------------------------------
80+
|
81+
| Enable/disable DataCollectors
82+
|
83+
*/
84+
85+
'collectors' => [
86+
'phpinfo' => true, // Php version
87+
'messages' => true, // Messages
88+
'time' => true, // Time Datalogger
89+
'memory' => true, // Memory usage
90+
'exceptions' => true, // Exception displayer
91+
'log' => true, // Logs from Monolog (merged in messages if enabled)
92+
'db' => true, // Show database (PDO) queries and bindings
93+
'views' => true, // Views with their data
94+
'route' => true, // Current route information
95+
'laravel' => false, // Laravel version and environment
96+
'events' => false, // All events fired
97+
'default_request' => false, // Regular or special Symfony request logger
98+
'symfony_request' => true, // Only one can be enabled..
99+
'mail' => true, // Catch mail messages
100+
'logs' => false, // Add the latest log messages
101+
'files' => false, // Show the included files
102+
'config' => false, // Display config settings
103+
'auth' => false, // Display Laravel authentication status
104+
'gate' => false, // Display Laravel Gate checks
105+
'session' => true, // Display session data
106+
],
107+
108+
/*
109+
|--------------------------------------------------------------------------
110+
| Extra options
111+
|--------------------------------------------------------------------------
112+
|
113+
| Configure some DataCollectors
114+
|
115+
*/
116+
117+
'options' => [
118+
'auth' => [
119+
'show_name' => false, // Also show the users name/email in the debugbar
120+
],
121+
'db' => [
122+
'with_params' => true, // Render SQL with the parameters substituted
123+
'timeline' => false, // Add the queries to the timeline
124+
'backtrace' => false, // EXPERIMENTAL: Use a backtrace to find the origin of the query in your files.
125+
'explain' => [ // EXPERIMENTAL: Show EXPLAIN output on queries
126+
'enabled' => false,
127+
'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
128+
],
129+
'hints' => true, // Show hints for common mistakes
130+
],
131+
'mail' => [
132+
'full_log' => false
133+
],
134+
'views' => [
135+
'data' => false, //Note: Can slow down the application, because the data can be quite large..
136+
],
137+
'route' => [
138+
'label' => true // show complete route on bar
139+
],
140+
'logs' => [
141+
'file' => null
142+
],
143+
],
144+
145+
/*
146+
|--------------------------------------------------------------------------
147+
| Inject Debugbar in Response
148+
|--------------------------------------------------------------------------
149+
|
150+
| Usually, the debugbar is added just before <body>, by listening to the
151+
| Response after the App is done. If you disable this, you have to add them
152+
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
153+
|
154+
*/
155+
156+
'inject' => true,
157+
158+
/*
159+
|--------------------------------------------------------------------------
160+
| DebugBar route prefix
161+
|--------------------------------------------------------------------------
162+
|
163+
| Sometimes you want to set route prefix to be used by DebugBar to load
164+
| its resources from. Usually the need comes from misconfigured web server or
165+
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
166+
|
167+
*/
168+
'route_prefix' => '_debugbar',
169+
170+
];

0 commit comments

Comments
 (0)