Skip to content

Commit

Permalink
Debugger::barDumb() can be temporarily disabled/enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
forgie1 committed Feb 15, 2023
1 parent fe2f476 commit caab847
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Tracy/Debugger/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit caab847

Please sign in to comment.