title: Enable Debug Component in Symfony 2.3
body: <p>Before opening a ticket in the symfony repository, I just wanted to check if I have missed something obvious.</p>
  
  <p>I want to enable the debug component (for having these nice exception screens, etc..).</p>
  
  <p>I just installed symfony using</p>
  
  <pre><code>composer create-project symfony/framework-standard-edition symfony 2.3.1
  </code></pre>
  
  <p>For testing purposes I added an exception to the WelcomeController:</p>
  
  <pre><code>class WelcomeController extends Controller
  {
      public function indexAction()
      {
          throw new \Exception("test");
          /*
           * The action's view can be rendered using render() method
           * or @Template annotation as demonstrated in DemoController.
           *
           */
          return $this-&gt;render('AcmeDemoBundle:Welcome:index.html.twig');
      }
  }
  </code></pre>
  
  <p>Instead of showing me the (old) exception screen, I am just getting a 502 Bad Gateway from nginx.</p>
  
  <p>app_dev.php:</p>
  
  <pre><code>//$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
  $loader = require_once __DIR__.'/../app/autoload.php';
  Debug::enable(-1);
  
  require_once __DIR__.'/../app/AppKernel.php';
  
  $kernel = new AppKernel('dev', true);
  //$kernel-&gt;loadClassCache();
  Request::enableHttpMethodParameterOverride();
  $request = Request::createFromGlobals();
  $response = $kernel-&gt;handle($request);
  $response-&gt;send();
  $kernel-&gt;terminate($request, $response);
  </code></pre>
  
  <h2>Update:</h2>
  
  <p>Handling PHP errors does work however:</p>
  
  <pre><code>IDoNotExist();
  </code></pre>
  
  <p>produces the gray symfony error screen.</p>