Latte Panel and Tracy standalone
- Marek Bartoš
- Nette Blogger | 1261
It will appear in Tracy only if the Engine instance is used to render a file.
- materix
- Backer | 83
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 | 1261
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)
- bernhard
- Member | 51
Hey everyone,
we have had this implementation in RockFrontend for the ProcessWire CMS, but
now I get this compile error:
https://i.imgur.com/EiWTFAq.png
Also the API docs say ::initialize is deprecated, but I don't know how to fix that. https://api.nette.org/…tePanel.html
See here for background: https://processwire.com/…acydebugger/?…
This is how I had it implemented but I simply removed it for the time being as I did not find a way to add it back without the error: https://github.com/…67eee4b89e9e
Any pointers would be much appreciated, thx!
Last edited by bernhard (2023-06-07 16:16)
- Marek Bartoš
- Nette Blogger | 1261
Deprecation message says to use TracyExtension. It should be as simple as that:
$latte = new \Latte\Engine();
$latte->addExtension(new \Latte\Bridges\Tracy\TracyExtension());
- bernhard
- Member | 51
Awesome, thx! https://github.com/…2caec62d60f3
Yeah, I read that. It said WHAT, but not HOW :)