Does anyone know how to disable the debug toolbar for Ajax calls?
I have tried this:
$this->container->get('profiler')->disable();
but didn't work.
I have a controller that returns a string (json encoded data). And in the development environment I get
<div class="debug"></div>
at the end of string which breaks my code.
Any help is appreciated.