I want to always display the toolbar in dev mode, not only on errors. I have the following method:
/**
* @Route("/", name="homepage")
*/
public function indexAction(Request $request) : JsonResponse
{
return new JsonResponse($param);
}
that I run to test the toolbar. This generates an error of course because $param
and the toolbar appears. But when I use return new JsonResponse('aaa');
everything works and the toolbar does not appear.
How to make the toolbar appread even without errors?
config:
framework:
templating:
engines: ['twig']
router:
resource: "%kernel.root_dir%/config/dev/routing.yml"
strict_requirements: true
profiler: { only_exceptions: false }
web_profiler:
toolbar: true
intercept_redirects: true
AppKernel:
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
$bundles[] = new Symfony\Bundle\TwigBundle\TwigBundle();
}