Skip to content

Commit 505be9d

Browse files
committed
add debugbar config
1 parent cfec5b3 commit 505be9d

File tree

1 file changed

+325
-0
lines changed

1 file changed

+325
-0
lines changed

config/debugbar.php

Lines changed: 325 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,325 @@
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+
| You can provide an array of URI's that must be ignored (eg. 'api/*')
14+
|
15+
*/
16+
17+
'enabled' => env('DEBUGBAR_ENABLED', null),
18+
'except' => [
19+
'telescope*',
20+
'horizon*',
21+
],
22+
23+
/*
24+
|--------------------------------------------------------------------------
25+
| Storage settings
26+
|--------------------------------------------------------------------------
27+
|
28+
| DebugBar stores data for session/ajax requests.
29+
| You can disable this, so the debugbar stores data in headers/session,
30+
| but this can cause problems with large data collectors.
31+
| By default, file storage (in the storage folder) is used. Redis and PDO
32+
| can also be used. For PDO, run the package migrations first.
33+
|
34+
| Warning: Enabling storage.open will allow everyone to access previous
35+
| request, do not enable open storage in publicly available environments!
36+
| Specify a callback if you want to limit based on IP or authentication.
37+
| Leaving it to null will allow localhost only.
38+
*/
39+
'storage' => [
40+
'enabled' => true,
41+
'open' => env('DEBUGBAR_OPEN_STORAGE'), // bool/callback.
42+
'driver' => 'file', // redis, file, pdo, socket, custom
43+
'path' => storage_path('debugbar'), // For file driver
44+
'connection' => null, // Leave null for default connection (Redis/PDO)
45+
'provider' => '', // Instance of StorageInterface for custom driver
46+
'hostname' => '127.0.0.1', // Hostname to use with the "socket" driver
47+
'port' => 2304, // Port to use with the "socket" driver
48+
],
49+
50+
/*
51+
|--------------------------------------------------------------------------
52+
| Editor
53+
|--------------------------------------------------------------------------
54+
|
55+
| Choose your preferred editor to use when clicking file name.
56+
|
57+
| Supported: "phpstorm", "vscode", "vscode-insiders", "vscode-remote",
58+
| "vscode-insiders-remote", "vscodium", "textmate", "emacs",
59+
| "sublime", "atom", "nova", "macvim", "idea", "netbeans",
60+
| "xdebug", "espresso"
61+
|
62+
*/
63+
64+
'editor' => env('DEBUGBAR_EDITOR') ?: env('IGNITION_EDITOR', 'phpstorm'),
65+
66+
/*
67+
|--------------------------------------------------------------------------
68+
| Remote Path Mapping
69+
|--------------------------------------------------------------------------
70+
|
71+
| If you are using a remote dev server, like Laravel Homestead, Docker, or
72+
| even a remote VPS, it will be necessary to specify your path mapping.
73+
|
74+
| Leaving one, or both of these, empty or null will not trigger the remote
75+
| URL changes and Debugbar will treat your editor links as local files.
76+
|
77+
| "remote_sites_path" is an absolute base path for your sites or projects
78+
| in Homestead, Vagrant, Docker, or another remote development server.
79+
|
80+
| Example value: "/home/vagrant/Code"
81+
|
82+
| "local_sites_path" is an absolute base path for your sites or projects
83+
| on your local computer where your IDE or code editor is running on.
84+
|
85+
| Example values: "/Users/<name>/Code", "C:\Users\<name>\Documents\Code"
86+
|
87+
*/
88+
89+
'remote_sites_path' => env('DEBUGBAR_REMOTE_SITES_PATH'),
90+
'local_sites_path' => env('DEBUGBAR_LOCAL_SITES_PATH', env('IGNITION_LOCAL_SITES_PATH')),
91+
92+
/*
93+
|--------------------------------------------------------------------------
94+
| Vendors
95+
|--------------------------------------------------------------------------
96+
|
97+
| Vendor files are included by default, but can be set to false.
98+
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
99+
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
100+
| and for js: jquery and highlight.js
101+
| So if you want syntax highlighting, set it to true.
102+
| jQuery is set to not conflict with existing jQuery scripts.
103+
|
104+
*/
105+
106+
'include_vendors' => true,
107+
108+
/*
109+
|--------------------------------------------------------------------------
110+
| Capture Ajax Requests
111+
|--------------------------------------------------------------------------
112+
|
113+
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
114+
| you can use this option to disable sending the data through the headers.
115+
|
116+
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
117+
|
118+
| Note for your request to be identified as ajax requests they must either send the header
119+
| X-Requested-With with the value XMLHttpRequest (most JS libraries send this), or have application/json as a Accept header.
120+
|
121+
| By default `ajax_handler_auto_show` is set to true allowing ajax requests to be shown automatically in the Debugbar.
122+
| Changing `ajax_handler_auto_show` to false will prevent the Debugbar from reloading.
123+
*/
124+
125+
'capture_ajax' => true,
126+
'add_ajax_timing' => false,
127+
'ajax_handler_auto_show' => true,
128+
'ajax_handler_enable_tab' => true,
129+
130+
/*
131+
|--------------------------------------------------------------------------
132+
| Custom Error Handler for Deprecated warnings
133+
|--------------------------------------------------------------------------
134+
|
135+
| When enabled, the Debugbar shows deprecated warnings for Symfony components
136+
| in the Messages tab.
137+
|
138+
*/
139+
'error_handler' => false,
140+
141+
/*
142+
|--------------------------------------------------------------------------
143+
| Clockwork integration
144+
|--------------------------------------------------------------------------
145+
|
146+
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
147+
| Extension, without the server-side code. It uses Debugbar collectors instead.
148+
|
149+
*/
150+
'clockwork' => false,
151+
152+
/*
153+
|--------------------------------------------------------------------------
154+
| DataCollectors
155+
|--------------------------------------------------------------------------
156+
|
157+
| Enable/disable DataCollectors
158+
|
159+
*/
160+
161+
'collectors' => [
162+
'phpinfo' => true, // Php version
163+
'messages' => true, // Messages
164+
'time' => true, // Time Datalogger
165+
'memory' => true, // Memory usage
166+
'exceptions' => true, // Exception displayer
167+
'log' => true, // Logs from Monolog (merged in messages if enabled)
168+
'db' => true, // Show database (PDO) queries and bindings
169+
'views' => true, // Views with their data
170+
'route' => true, // Current route information
171+
'auth' => false, // Display Laravel authentication status
172+
'gate' => true, // Display Laravel Gate checks
173+
'session' => true, // Display session data
174+
'symfony_request' => true, // Only one can be enabled..
175+
'mail' => true, // Catch mail messages
176+
'laravel' => false, // Laravel version and environment
177+
'events' => false, // All events fired
178+
'default_request' => false, // Regular or special Symfony request logger
179+
'logs' => false, // Add the latest log messages
180+
'files' => false, // Show the included files
181+
'config' => false, // Display config settings
182+
'cache' => false, // Display cache events
183+
'models' => true, // Display models
184+
'livewire' => true, // Display Livewire (when available)
185+
'jobs' => false, // Display dispatched jobs
186+
],
187+
188+
/*
189+
|--------------------------------------------------------------------------
190+
| Extra options
191+
|--------------------------------------------------------------------------
192+
|
193+
| Configure some DataCollectors
194+
|
195+
*/
196+
197+
'options' => [
198+
'time' => [
199+
'memory_usage' => false, // Calculated by subtracting memory start and end, it may be inaccurate
200+
],
201+
'messages' => [
202+
'trace' => true, // Trace the origin of the debug message
203+
],
204+
'memory' => [
205+
'reset_peak' => false, // run memory_reset_peak_usage before collecting
206+
'with_baseline' => false, // Set boot memory usage as memory peak baseline
207+
'precision' => 0, // Memory rounding precision
208+
],
209+
'auth' => [
210+
'show_name' => true, // Also show the users name/email in the debugbar
211+
'show_guards' => true, // Show the guards that are used
212+
],
213+
'db' => [
214+
'with_params' => true, // Render SQL with the parameters substituted
215+
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
216+
'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults)
217+
'timeline' => false, // Add the queries to the timeline
218+
'duration_background' => true, // Show shaded background on each query relative to how long it took to execute.
219+
'explain' => [ // Show EXPLAIN output on queries
220+
'enabled' => false,
221+
'types' => ['SELECT'], // Deprecated setting, is always only SELECT
222+
],
223+
'hints' => false, // Show hints for common mistakes
224+
'show_copy' => false, // Show copy button next to the query,
225+
'slow_threshold' => false, // Only track queries that last longer than this time in ms
226+
'memory_usage' => false, // Show queries memory usage
227+
'soft_limit' => 100, // After the soft limit, no parameters/backtrace are captured
228+
'hard_limit' => 500, // After the hard limit, queries are ignored
229+
],
230+
'mail' => [
231+
'timeline' => false, // Add mails to the timeline
232+
'show_body' => true,
233+
],
234+
'views' => [
235+
'timeline' => false, // Add the views to the timeline (Experimental)
236+
'data' => false, //true for all data, 'keys' for only names, false for no parameters.
237+
'group' => 50, // Group duplicate views. Pass value to auto-group, or true/false to force
238+
'exclude_paths' => [ // Add the paths which you don't want to appear in the views
239+
'vendor/filament', // Exclude Filament components by default
240+
],
241+
],
242+
'route' => [
243+
'label' => true, // show complete route on bar
244+
],
245+
'session' => [
246+
'hiddens' => [], // hides sensitive values using array paths
247+
],
248+
'symfony_request' => [
249+
'hiddens' => [], // hides sensitive values using array paths, example: request_request.password
250+
],
251+
'events' => [
252+
'data' => false, // collect events data, listeners
253+
],
254+
'logs' => [
255+
'file' => null,
256+
],
257+
'cache' => [
258+
'values' => true, // collect cache values
259+
],
260+
],
261+
262+
/*
263+
|--------------------------------------------------------------------------
264+
| Inject Debugbar in Response
265+
|--------------------------------------------------------------------------
266+
|
267+
| Usually, the debugbar is added just before </body>, by listening to the
268+
| Response after the App is done. If you disable this, you have to add them
269+
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
270+
|
271+
*/
272+
273+
'inject' => true,
274+
275+
/*
276+
|--------------------------------------------------------------------------
277+
| DebugBar route prefix
278+
|--------------------------------------------------------------------------
279+
|
280+
| Sometimes you want to set route prefix to be used by DebugBar to load
281+
| its resources from. Usually the need comes from misconfigured web server or
282+
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
283+
|
284+
*/
285+
'route_prefix' => '_debugbar',
286+
287+
/*
288+
|--------------------------------------------------------------------------
289+
| DebugBar route middleware
290+
|--------------------------------------------------------------------------
291+
|
292+
| Additional middleware to run on the Debugbar routes
293+
*/
294+
'route_middleware' => [],
295+
296+
/*
297+
|--------------------------------------------------------------------------
298+
| DebugBar route domain
299+
|--------------------------------------------------------------------------
300+
|
301+
| By default DebugBar route served from the same domain that request served.
302+
| To override default domain, specify it as a non-empty value.
303+
*/
304+
'route_domain' => null,
305+
306+
/*
307+
|--------------------------------------------------------------------------
308+
| DebugBar theme
309+
|--------------------------------------------------------------------------
310+
|
311+
| Switches between light and dark theme. If set to auto it will respect system preferences
312+
| Possible values: auto, light, dark
313+
*/
314+
'theme' => env('DEBUGBAR_THEME', 'auto'),
315+
316+
/*
317+
|--------------------------------------------------------------------------
318+
| Backtrace stack limit
319+
|--------------------------------------------------------------------------
320+
|
321+
| By default, the DebugBar limits the number of frames returned by the 'debug_backtrace()' function.
322+
| If you need larger stacktraces, you can increase this number. Setting it to 0 will result in no limit.
323+
*/
324+
'debug_backtrace_limit' => 50,
325+
];

0 commit comments

Comments
 (0)