V
V
VicTHOR2021-08-06 10:32:37
PHP
VicTHOR, 2021-08-06 10:32:37

How to add a message after rendering in php debugbar?

I'm setting up debugbar on a self-written site. I show it when rendering the page. Next, via AJAX, there is a request to some API controller, there you need to catch the Exception and add it to the already rendered debugbar ... I try through try-catch , but nothing is displayed in the Exceptions section .. Has anyone configured this? How to implement it? $debugbar['exceptions']->addException($e);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
inFureal, 2021-08-06
@inFureal

How do you add something to a regular string?
How it happens: after the view itself is rendered, a debugbar is injected which converts the data it has collected so far into a regular string. Those. this is no longer a stateful object, but plain html/js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question