Skip to content

Commit

Permalink
Reword
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Dec 15, 2023
1 parent 8688b34 commit 618d70b
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -622,28 +622,24 @@ react to signals, read more in :doc:`this section </components/console/events>`.
Profiling Commands
------------------

When debug mode and the profiler are enabled, you can run a command with the
``--profile`` option. Symfony will then collect data about the command execution.
When the execution is over, the profile is accessible through the web page of
the :doc:`Symfony Profiler </profiler>`.
Symfony allows to profile the execution of any command, including yours. First,
make sure that the :ref:`debug mode <debug-mode>` and the :doc:`profiler </profiler>`
are enabled. Then, add the ``--profile`` option when running the command:

.. tip::

If you run the command in verbose mode (``-v``), Symfony will display
in the output a clickable link to the command profile (if your terminal
supports links). If you run it in debug verbosity (``-vvv``) you'll
also see the time and memory consumed by the command.

.. code-block:: terminal
.. code-block:: terminal
$ php bin/console --profile -v app:my-command
...
$ php bin/console --profile app:my-command
[OK] Command successful !
Symfony will now collect data about the command execution, which is helpful to
debug errors or check other issues. When the command execution is over, the
profile is accessible through the web page of the profiler.

See profile f4ef63 # <- this is a clickable link if your terminal supports it
.. tip::

```
If you run the command in verbose mode (adding the ``-v`` option), Symfony
will display in the output a clickable link to the command profile (if your
terminal supports links). If you run it in debug verbosity (``-vvv``) you'll
also see the time and memory consumed by the command.

.. versionadded:: 6.4

Expand Down

0 comments on commit 618d70b

Please sign in to comment.