diff --git a/cookbook/service_container/event_listener.rst b/cookbook/service_container/event_listener.rst index 00b66670a48..17710e3aac4 100644 --- a/cookbook/service_container/event_listener.rst +++ b/cookbook/service_container/event_listener.rst @@ -133,3 +133,20 @@ done as follow:: Two types of request are available in the :class:`Symfony\\Component\\HttpKernel\\HttpKernelInterface` interface: ``HttpKernelInterface::MASTER_REQUEST`` and ``HttpKernelInterface::SUB_REQUEST``. + +Debugging Event Listeners +------------------------- + +You can find out what listeners are registered in the event dispatcher +using the console. To show all events and their listeners, run: + +.. code-block:: bash + + $ php app/console debug:event-dispatcher + +You can get registered listeners for a particular event by specifying +its name: + +.. code-block:: bash + + $ php app/console debug:event-dispatcher kernel.exception