Latte Panel and Tracy standalone

materix
Generous Backer | 47
+
0
-

I am using Latte 2.11 and Tracy 2.9.


Tracy\Debugger::enable(Tracy\Debugger::DEVELOPMENT);

$latte = new Latte\Engine();

How do I enable the LattePanel in Tracy, when using them standalone?

Marek Bartoš
Nette Blogger | 824
+
+1
-

Latte\Bridges\Tracy\LattePanel::initialize($latte);

materix
Generous Backer | 47
+
0
-

Thanks!

But no new panel appears in Tracy when I do:


Tracy\Debugger::enable(Tracy\Debugger::DEVELOPMENT);
$latte = new Latte\Engine();
Latte\Bridges\Tracy\LattePanel::initialize($latte);
Marek Bartoš
Nette Blogger | 824
+
0
-

It will appear in Tracy only if the Engine instance is used to render a file.

materix
Generous Backer | 47
+
0
-

I missed the last line of code in my previous post. Here is my actual code:


Tracy\Debugger::enable(Tracy\Debugger::DEVELOPMENT);
$latte = new Latte\Engine();
Latte\Bridges\Tracy\LattePanel::initialize($latte);
$latte->render('latte/index.latte', $page);

but no Latte-panel appears…

Marek Bartoš
Nette Blogger | 824
+
+1
-

Other panels work for you? You may be adding it too late. Otherwise I don't see reason why it shouldn't work.

Last edited by Marek Bartoš (2022-10-03 16:02)

materix
Generous Backer | 47
+
0
-

Thanks, you are correct! I had to add the code earlier.