---
title: "Debugging"
manual: "TYPO3 Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:examples-debug@13.4"
source: "ApiOverview/Debugging/Index.rst"
rendered: "2026-09-26T10:27:18+00:00"
---

# Debugging {#examples-debug}

-   [PHP](https://docs.typo3.org/permalink/t3coreapi:php@13.4)
-   [TYPO3 backend debug mode](https://docs.typo3.org/permalink/t3coreapi:typo3-backend-debug-mode@13.4)
-   [Extbase DebuggerUtility](https://docs.typo3.org/permalink/t3coreapi:extbase-debuggerutility@13.4)
-   [Fluid Debug ViewHelper](https://docs.typo3.org/permalink/t3coreapi:fluid-debug-viewhelper@13.4)
-   [Xdebug](https://docs.typo3.org/permalink/t3coreapi:xdebug@13.4)

## PHP {#examples-debug-php}

## TYPO3 backend debug mode {#examples-debug-backend}

To display additional debug information in the backend, set
[$GLOBALS\['TYPO3_CONF_VARS'\]\['BE'\]\['debug'\]](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-be-debug@13.4)
in `config/system/settings.php` and log in with an administrator
account.

It shows for example the names of fields and in case of select, radio and
checkbox fields the values in addition, which are generated by the
[FormEngine](https://docs.typo3.org/permalink/t3coreapi:formengine@13.4). These can be used to set access permissions or
configuration using [Page TSconfig](https://docs.typo3.org/m/typo3/reference-typoscript/13.4/en-us/PageTsconfig/Index.html#pagetsconfig).

If [EXT:lowlevel](https://docs.typo3.org/c/typo3/cms-lowlevel/13.4/en-us/Index.html) is installed, the name of the
database table or field is appended to the select options in the
**System > DB Check > Full Search** module.

Additionally, in debug mode, the page renderer does not compress or concatenate
JavaScript or CSS resources.

### `DebugUtility::debug()` {#examples-debug-utility}

The TYPO3 Core provides a simple `debug()` (defined in
`EXT:core/Classes/Core/GlobalDebugFunctions.php`). It wraps around
`\TYPO3\CMS\Core\Utility\DebugUtility::debug()` and will output debug
information only if it matches a set of IP addresses (defined in
[$GLOBALS\['TYPO3_CONF_VARS'\]\['SYS'\]\['devIPmask'\]](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-sys-devipmask@13.4)).

For example, the following code:

**Extension examples, file Classes/Controller/ModuleController.php**

```php
<?php

use TYPO3\CMS\Core\Utility\DebugUtility;

class ModuleController extends ActionController implements LoggerAwareInterface
{
  protected function debugCookies()
  {
    DebugUtility::debug($_COOKIE, 'cookie');
  }
}

```

will produce such an output:

![](../../Images/ManualScreenshots/Examples/Debugging/DebugOutput.png)

In general, look at class `\TYPO3\CMS\Core\Utility\DebugUtility` for useful
debugging tools.

## Extbase DebuggerUtility {#examples-debug-extbase-utility}

Extbase's DebuggerUtility::var_dump() is a debugging function in TYPO3 that outputs detailed, human-readable information about variables, including their type and structure. It offers features like depth control and optional backtrace information to assist developers in effectively debugging complex data structures.

**Example:**

`\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($myVariable);`

You can also use the Extbase DebuggerUtility to debug SQL Querys for example. To do so, put the following code snippet before the execute function of your SQL query:

`\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryBuilder->getSQL());`

## Fluid Debug ViewHelper {#examples-debug-fluid}

The Fluid Debug ViewHelper is a part of the Fluid template engine and generates a HTML dump of the tagged variable. The ViewHelper can be used in any Fluid template to output the value of variables or objects in a human-readable format.

**Example:**

`<f:debug>{myVariable}</f:debug>`

To display all available variables in your Fluid template, you can use the \_all placeholder:

`<f:debug>{_all}</f:debug>`

> [!NOTE]
> If you are debugging in a Fluid partial or a Fluid section, make sure that all variables you want to analyse are passed (defined in the arguments attribute of the render tag).

Get more information in the Fluid ViewHelper Reference [Debug ViewHelper \<f:debug>](https://docs.typo3.org/other/typo3/view-helper-reference/13.4/en-us/Global/Debug.html#typo3-fluid-debug)

## Xdebug {#examples-debug-xdebug}

First of all: best practice to debug PHP code is using an IDE (like [PhpStorm](https://www.jetbrains.com/phpstorm/)
or [Visual Studio Code](https://code.visualstudio.com/)) with [Xdebug](https://xdebug.org/). Advantages are:

-   You can investigate the values of variables and class properties when
    setting a breakpoint.
-   You can move forward line by line and see how the variables and properties
    change.
-   You can also step into calling methods and functions.
-   You see the calling code as a stack trace.

> [!NOTE]
> **See also**
>
> -   [Configure Xdebug in PhpStorm](https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html)
> -   [Configure Xdebug in Visual Studio Code](https://tommcfarlin.com/xdebug-in-visual-studio-code/)
