Skip to content

Commit 9c4200d

Browse files
committed
Merge pull request #2141 from yosmanyga/debugging
Update debugging.rst
2 parents c959bd0 + 1bd5d79 commit 9c4200d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cookbook/debugging.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,28 @@ The ``app_dev.php`` front controller reads as follows by default::
3030

3131
// ...
3232

33-
require_once __DIR__.'/../app/bootstrap.php.cache';
33+
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
3434
require_once __DIR__.'/../app/AppKernel.php';
3535

36-
use Symfony\Component\HttpFoundation\Request;
37-
3836
$kernel = new AppKernel('dev', true);
3937
$kernel->loadClassCache();
40-
$kernel->handle(Request::createFromGlobals())->send();
38+
$request = Request::createFromGlobals();
4139

4240
To make your debugger happier, disable all PHP class caches by removing the
4341
call to ``loadClassCache()`` and by replacing the require statements like
4442
below::
4543

4644
// ...
4745

48-
// require_once __DIR__.'/../app/bootstrap.php.cache';
49-
require_once __DIR__.'/../app/autoload.php';
46+
// $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
47+
$loader = require_once __DIR__.'/../app/autoload.php';
5048
require_once __DIR__.'/../app/AppKernel.php';
5149

5250
use Symfony\Component\HttpFoundation\Request;
5351

5452
$kernel = new AppKernel('dev', true);
5553
// $kernel->loadClassCache();
56-
$kernel->handle(Request::createFromGlobals())->send();
54+
$request = Request::createFromGlobals();
5755

5856
.. tip::
5957

0 commit comments

Comments
 (0)