Debug Configuration Reference (DebugBundle)

The DebugBundle integrates the VarDumper component in Symfony applications. All these options are configured under the debug key in your application configuration.

DebugBundle は、VarDumper コンポーネントを Symfony アプリケーションに統合します。これらのオプションはすべて、アプリケーション構成の debugkey の下で構成されます。
1
2
3
4
5
6
7
8
9
# displays the default config values defined by Symfony
$ php bin/console config:dump-reference framework

# displays the actual config values used by your application
$ php bin/console debug:config framework

# displays the config values used by your application and replaces the
# environment variables with their actual values
$ php bin/console debug:config --resolve-env framework

6.2

6.2

The --resolve-env option was introduced in Symfony 6.2.

--resolve-env オプションは Symfony 6.2 で導入されました。

Note

ノート

When using XML, you must use the http://symfony.com/schema/dic/debug namespace and the related XSD schema is available at: https://symfony.com/schema/dic/debug/debug-1.0.xsd

XML を使用する場合、http://symfony.com/schema/dic/debugnamespace を使用する必要があり、関連する XSD スキーマは https://symfony.com/schema/dic/debug/debug-1.0.xsd で入手できます。

Configuration

max_items

type: integer default: 2500

タイプ: 整数 デフォルト: 2500

This is the maximum number of items to dump. Setting this option to -1 disables the limit.

これは、ダンプする項目の最大数です。このオプションを -1 に設定すると、制限が無効になります。

min_depth

type: integer default: 1

タイプ: 整数 デフォルト: 1

Configures the minimum tree depth until which all items are guaranteed to be cloned. After this depth is reached, only max_items items will be cloned. The default value is 1, which is consistent with older Symfony versions.

すべてのアイテムのクローン作成が保証される最小のツリー深度を構成します。この深さに達すると、max_items アイテムのみが複製されます。デフォルト値は 1 で、これは古いバージョンの Symfony と一致しています。

max_string_length

type: integer default: -1

タイプ: 整数 デフォルト: -1

This option configures the maximum string length before truncating the string. The default value (-1) means that strings are never truncated.

このオプションは、文字列を切り詰める前の最大文字列長を構成します。デフォルト値 (-1) は、文字列が切り捨てられないことを意味します。

dump_destination

type: string default: null

タイプ: 文字列 デフォルト: null

Configures the output destination of the dumps.

ダンプの出力先を設定します。

By default, dumps are shown in the WebDebugToolbar when returning HTML. Since this is not always possible (e.g. when working on a JSON API), you can have an alternate output destination for dumps. Typically, you would set this to php://stderr:

デフォルトでは、HTML を返すときに WebDebugToolbar にダンプが表示されます。これが常に可能であるとは限らないため (たとえば、JSON API で作業している場合)、ダンプの代替出力先を設定できます。通常、これを php:// に設定します。標準エラー:
  • YAML
    YAML
  • XML
    XML
  • PHP
    PHP
1
2
3
# config/packages/debug.yaml
debug:
    dump_destination: php://stderr

Configure it to "tcp://%env(VAR_DUMPER_SERVER)%" in order to use the ServerDumper feature.

ServerDumper 機能を使用するには、「tcp://%env(VAR_DUMPER_SERVER)%」に構成します。