Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

debugbar.php 14KB

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