Skip to content

Commit

Permalink
Add debug_backtrace_limit configuration option (#1114)
Browse files Browse the repository at this point in the history
* Add debug_backtrace_limit configuration option

* Fix whitespace

Co-authored-by: Barry vd. Heuvel <[email protected]>
  • Loading branch information
pataar and barryvdh authored May 13, 2021
1 parent 49c1e07 commit fb53831
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions config/debugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,14 @@
| Possible values: auto, light, dark
*/
'theme' => env('DEBUGBAR_THEME', 'auto'),

/*
|--------------------------------------------------------------------------
| Backtrace stack limit
|--------------------------------------------------------------------------
|
| By default, the DebugBar limits the number of frames returned by the 'debug_backtrace()' function.
| If you need larger stacktraces, you can increase this number. Setting it to 0 will result in no limit.
*/
'debug_backtrace_limit' => 50,
];
2 changes: 1 addition & 1 deletion src/DataCollector/QueryCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ protected function performQueryAnalysis($query)
*/
protected function findSource()
{
$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT, 50);
$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT, app('config')->get('debugbar.debug_backtrace_limit', 50));

$sources = [];

Expand Down

0 comments on commit fb53831

Please sign in to comment.