@@ -622,28 +622,24 @@ react to signals, read more in :doc:`this section </components/console/events>`.
622
622
Profiling Commands
623
623
------------------
624
624
625
- When debug mode and the profiler are enabled, you can run a command with the
626
- ``--profile `` option. Symfony will then collect data about the command execution.
627
- When the execution is over, the profile is accessible through the web page of
628
- the :doc: `Symfony Profiler </profiler >`.
625
+ Symfony allows to profile the execution of any command, including yours. First,
626
+ make sure that the :ref: `debug mode <debug-mode >` and the :doc: `profiler </profiler >`
627
+ are enabled. Then, add the ``--profile `` option when running the command:
629
628
630
- .. tip ::
631
-
632
- If you run the command in verbose mode (``-v ``), Symfony will display
633
- in the output a clickable link to the command profile (if your terminal
634
- supports links). If you run it in debug verbosity (``-vvv ``) you'll
635
- also see the time and memory consumed by the command.
636
-
637
- .. code-block :: terminal
629
+ .. code-block :: terminal
638
630
639
- $ php bin/console --profile -v app:my-command
640
- ...
631
+ $ php bin/console --profile app:my-command
641
632
642
- [OK] Command successful !
633
+ Symfony will now collect data about the command execution, which is helpful to
634
+ debug errors or check other issues. When the command execution is over, the
635
+ profile is accessible through the web page of the profiler.
643
636
644
- See profile f4ef63 # <- this is a clickable link if your terminal supports it
637
+ .. tip ::
645
638
646
- ```
639
+ If you run the command in verbose mode (adding the ``-v `` option), Symfony
640
+ will display in the output a clickable link to the command profile (if your
641
+ terminal supports links). If you run it in debug verbosity (``-vvv ``) you'll
642
+ also see the time and memory consumed by the command.
647
643
648
644
.. versionadded :: 6.4
649
645
0 commit comments