Skip to content

Commit caab847

Browse files
committed
Debugger::barDumb() can be temporarily disabled/enabled
1 parent fe2f476 commit caab847

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Tracy/Debugger/Debugger.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ class Debugger
3636
/** in production mode is suppressed any debugging output */
3737
public static ?bool $productionMode = self::DETECT;
3838

39+
/** barDumps can be disabled or enabled on demand */
40+
public static bool $barDumpOn = true;
41+
3942
/** whether to display debug bar in development mode */
4043
public static bool $showBar = true;
4144

@@ -535,7 +538,7 @@ public static function timer(?string $name = null): float
535538
*/
536539
public static function barDump(mixed $var, ?string $title = null, array $options = []): mixed
537540
{
538-
if (!self::$productionMode) {
541+
if (!self::$productionMode && self::$barDumpOn) {
539542
static $panel;
540543
if (!$panel) {
541544
self::getBar()->addPanel($panel = new DefaultBarPanel('dumps'), 'Tracy:dumps');

0 commit comments

Comments
 (0)