At the moment I'm debugging an issue with our Symfony 2 application which doesn't occur on the development environment, but does on the staging and production environments. To assist my debugging, I'd like to enable Symfony's profiler. Specifically its timeline.
To do that, I've modified app.php
to load the development environment by changing the new AppKernel()
call:
// Used to be
$kernel = new AppKernel('stage', false);
// Is now
$kernel = new AppKernel('dev', true);
This has enabled the debug toolbar and allowed me to access the profiler on the staging environment. But when I attempt to view the timeline, I get:
No timing events have been recorded. Are you sure that debugging is enabled in the kernel?
I assumed that debugging would be enabled already considering I'm on the dev
environment. I've also confirmed that Symfony is reading from the development config files rather than the production ones. Also, on my local machine, where the development environment usually sits, the profiler with the timeline is enabled and working properly.
How can I enable debugging in the kernel, despite setting the environment to dev
?
Did you checked that ? http://symfony.com/doc/current/cookbook/configuration/environments.html#selecting-the-environment-for-console-commands
should solve your problem.