diff --git a/book/service_container.rst b/book/service_container.rst index 63b5eb7c9f8..7c309e926e5 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -925,6 +925,29 @@ additional arguments (beyond just the ``name`` parameter). For a list of all the tags available in the core Symfony Framework, check out :doc:`/reference/dic_tags`. +Debugging Services +------------------ + +You can find out what services are registered with the container using the +console, to list the services by id and which class they are: + +.. code-block:: bash + + $ php app/console container:debug + +By default only public services are shown, you can also view private services: + +.. code-block:: bash + + $ php app/console container:debug --show-private + +You can get more detailed information about a particular service by specifying +its id: + +.. code-block:: bash + + $ php app/console container:debug my_mailer + Learn more ----------