Debug ViewHelper <f:debug>
ViewHelper to generate an HTML readable dump of variables or objects. The output can be navigated like a nested tree. The output will be put at the beginning of the HTML response, unless the inline
attribute is set, so that the output will be placed at the specific place where it is placed inside a Fluid template.
Go to the source code of this ViewHelper: DebugViewHelper.php (GitHub).
Arguments
The following arguments are available for the debug ViewHelper:
ansiColors
-
- Type
- bool
- Default
- false
If TRUE, ANSI color codes is added to the plaintext output, if FALSE (default) the plaintext debug output not colored.
blacklistedClassNames
-
- Type
- array
An array of class names (RegEx) to be filtered. Default is an array of some common class names.
blacklistedPropertyNames
-
- Type
- array
An array of property names and/or array keys (RegEx) to be filtered. Default is an array of some common property names.
inline
-
- Type
- bool
- Default
- false
if TRUE, the dump is rendered at the position of the <f:debug> tag. If FALSE (default), the dump is displayed at the top of the page.
maxDepth
-
- Type
- int
- Default
- 8
Sets the max recursion depth of the dump (defaults to 8). De- or increase the number according to your needs and memory limit.
plainText
-
- Type
- bool
- Default
- false
If TRUE, the dump is in plain text, if FALSE the debug output is in HTML format.
title
-
- Type
- string
optional custom title for the debug output
Examples
Simple
<f:debug>{myVariable}</f:debug>
Copied!
[A HTML dump of myVariable value]
All Features
<f:debug title="My Title" maxDepth="5"
blacklistedClassNames="{0:'ACME\BlogExample\Domain\Model\Administrator'}"
blacklistedPropertyNames="{0:'posts'}"
plainText="true" ansiColors="false"
inline="true"
>
{blogs}
</f:debug>
Copied!
[A HTML view of the var_dump]