When using a StreamedResponse in Symfony2/3, I cannot see the Web Debug Toolbar.
Another answer indicates "there only needs to be valid HTML with a <body>", but even with this code
public function indexAction()
{
$sr = new StreamedResponse();
$sr->setCallback(function() {
echo "<!DOCTYPE html><html><head><title>Where is the bar?</title></head><body><p>Hi. Can I haz bar pleeze?</p></body></html>";
flush();
});
$sr->send();
return $sr;
//return $this->render('index.html.twig');
}
I cannot make the bar appear.
Is this something related to the nature of the StreamedResponse? Or is there someting I need to call on the response to let symfony know the bar should be added to this response as well?
@$_SERVER['REMOTE_ADDR']line in theapp_dev.phpfile.