0b39ce2315
* 2.6: (24 commits) [HttpKernel] Embed the original exception as previous to bounced exceptions [Enhancement] netbeans - force interactive shell when limited detection [FrameworkBundle] fixes displaying of deprecation notices. Revert "Added missing changelog entry" [Debug] Tweak docblocks [Debug] Rework a bit the PHP doc Added missing changelog entry [StringUtil] Fixed singularification of 'movies' [Debug] Renamed "context" key to "scope_vars" to avoid any ambiguity Fix some phpdocs for Twig extensions & templating helpers [Debug] Made code in ErrorHandler easier to read Use specialized config methods instead of the generic ifTrue() method Fix the AJAX profiling bumped Symfony version to 2.6.7 updated VERSION for 2.6.6 updated CHANGELOG for 2.6.6 Safe escaping of fragments for eval() bumped Symfony version to 2.3.28 updated VERSION for 2.3.27 update CONTRIBUTORS for 2.3.27 ... Conflicts: src/Symfony/Component/Debug/ErrorHandler.php src/Symfony/Component/HttpKernel/Kernel.php |
||
---|---|---|
.. | ||
Exception | ||
FatalErrorHandler | ||
Resources/ext | ||
Tests | ||
.gitignore | ||
CHANGELOG.md | ||
composer.json | ||
Debug.php | ||
DebugClassLoader.php | ||
ErrorHandler.php | ||
ExceptionHandler.php | ||
LICENSE | ||
phpunit.xml.dist | ||
README.md |
Debug Component
Debug provides tools to make debugging easier.
Enabling all debug tools is as easy as calling the enable()
method on the
main Debug
class:
use Symfony\Component\Debug\Debug;
Debug::enable();
You can also use the tools individually:
use Symfony\Component\Debug\ErrorHandler;
use Symfony\Component\Debug\ExceptionHandler;
if ('cli' !== php_sapi_name()) {
ini_set('display_errors', 0);
ExceptionHandler::register();
} elseif (!ini_get('log_errors') || ini_get('error_log')) {
ini_set('display_errors', 1);
}
ErrorHandler::register();
Note that the Debug::enable()
call also registers the debug class loader
from the Symfony ClassLoader component when available.
This component can optionally take advantage of the features of the HttpKernel and HttpFoundation components.
Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Debug/
$ composer install
$ phpunit