This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Debug
Nicolas Grekas 0b39ce2315 Merge branch '2.6' into 2.7
* 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
2015-04-03 17:24:01 +02:00
..
Exception Merge branch '2.6' into 2.7 2015-01-16 15:55:54 +01:00
FatalErrorHandler Normalizes deprecation notice messages. 2015-01-05 16:02:28 +01:00
Resources/ext [Debug] expose object_handle 2014-09-27 09:02:10 +02:00
Tests [Debug] Updated the default log level when a PHP error occurs 2015-04-02 16:54:44 +02:00
.gitignore [Debug] fixed minor bugs 2013-04-07 18:19:06 +02:00
CHANGELOG.md [Debug] generalized ErrorHandler 2014-06-16 13:52:56 +02:00
composer.json Merge branch '2.3' into 2.6 2015-02-24 12:52:21 +01:00
Debug.php Merge branch '2.5' into 2.6 2014-12-02 21:19:20 +01:00
DebugClassLoader.php [Debug] Deprecations exception for Symfony internals 2015-02-23 16:12:01 +01:00
ErrorHandler.php Merge branch '2.6' into 2.7 2015-04-03 17:24:01 +02:00
ExceptionHandler.php Merge branch '2.6' into 2.7 2015-03-22 17:57:18 +01:00
LICENSE Updated copyright to 2015 2015-01-01 13:56:52 +01:00
phpunit.xml.dist [2.3] require-dev PHPUnit bridge 2015-02-24 11:24:26 +01:00
README.md Merge branch '2.3' into 2.6 2015-02-11 08:12:14 +01:00

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