From caab847489424b1d2d808d6c17b18b6ebb42824a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Forg=C3=A1=C4=8D?= Date: Wed, 15 Feb 2023 11:30:34 +0100 Subject: [PATCH] Debugger::barDumb() can be temporarily disabled/enabled --- src/Tracy/Debugger/Debugger.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Tracy/Debugger/Debugger.php b/src/Tracy/Debugger/Debugger.php index f298074c7..70a5a3f26 100644 --- a/src/Tracy/Debugger/Debugger.php +++ b/src/Tracy/Debugger/Debugger.php @@ -36,6 +36,9 @@ class Debugger /** in production mode is suppressed any debugging output */ public static ?bool $productionMode = self::DETECT; + /** barDumps can be disabled or enabled on demand */ + public static bool $barDumpOn = true; + /** whether to display debug bar in development mode */ public static bool $showBar = true; @@ -535,7 +538,7 @@ public static function timer(?string $name = null): float */ public static function barDump(mixed $var, ?string $title = null, array $options = []): mixed { - if (!self::$productionMode) { + if (!self::$productionMode && self::$barDumpOn) { static $panel; if (!$panel) { self::getBar()->addPanel($panel = new DefaultBarPanel('dumps'), 'Tracy:dumps');