Version: 2.7.4
Bug Description
BarDump is not correctly escaped in lazy mode, which can occasionally lead to Tracy Bar not being displayed at all, because the Tracy.Debug.Init call is not parsed correctly. The issue happens in both Chrome and Firefox. There are no JS errors in console when that happens and pasting the generated Tracy.Debug.Init call into browser console makes the bar show up normally.
Steps To Reproduce
<?php
use Tracy\Debugger;
require_once __DIR__ . '/vendor/autoload.php';
Debugger::enable(Debugger::DEVELOPMENT);
$a = (object) [
'a' => '<!--<script>',
];
Debugger::barDump($a, 'a');
// this works
//Debugger::barDump($a, 'a', [\Tracy\Dumper::LAZY => false]);
//Debugger::barDump($a->a, 'a');
It generates a call like this (shortened):
<script>
Tracy.Debug.init("... data-tracy-snapshot='{\"1\":{\"name\":\"stdClass\",\"hash\":\"520b\",\"items\":[[\"a\",\"<!--<script>\",0]]}}' ...");
</script>
Expected Behavior
The bar should show up as usual and contain the same dump as without the lazy mode.
Version: 2.7.4
Bug Description
BarDump is not correctly escaped in lazy mode, which can occasionally lead to Tracy Bar not being displayed at all, because the
Tracy.Debug.Initcall is not parsed correctly. The issue happens in both Chrome and Firefox. There are no JS errors in console when that happens and pasting the generatedTracy.Debug.Initcall into browser console makes the bar show up normally.Steps To Reproduce
It generates a call like this (shortened):
Expected Behavior
The bar should show up as usual and contain the same dump as without the lazy mode.