Skip to content

Documented the new Dump Server #9783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions components/var_dumper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,34 @@ current PHP SAPI:
.. versionadded:: 4.1
The ``dd()`` helper method was introduced in Symfony 4.1.

The Dump Server
---------------

.. versionadded:: 4.1
The dump server was introduced in Symfony 4.1.

The ``dump()`` function outputs its contents in the same browser window or
console terminal as your own application. Sometimes mixing the real output
with the debug output can be confusing. That's why this component provides a
server to collect all the dumped data.

Start the server with the ``server:dump`` command and whenever you call to
``dump()``, the dumped data won't be displayed in the output but sent to that
server, which outputs it to its own console or to an HTML file:

.. code-block:: terminal

# displays the dumped data in the console:
$ ./bin/console server:dump
[OK] Server listening on tcp://0.0.0.0:9912

# stores the dumped data in a file using the HTML format:
$ ./bin/console server:dump --format=html > dump.html

Inside a Symfony application, the output of the dump server is configured with
the :ref:`dump_destination option <configuration-debug-dump_destination>` of the
``debug`` package.

DebugBundle and Twig Integration
--------------------------------

Expand Down
2 changes: 2 additions & 0 deletions reference/configuration/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ max_string_length
This option configures the maximum string length before truncating the
string. The default value (``-1``) means that strings are never truncated.

.. _configuration-debug-dump_destination:

dump_destination
~~~~~~~~~~~~~~~~

Expand Down