Attention

TYPO3 v10 has reached end-of-life as of April 30th 2023 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.

Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.

Debugging / Analyzing

Debugging TypoScript can be complicated as there are many influences like the active page and conditions. Also constants can be used which get substituted. The following sections provide information about how to debug TypoScript and how to find errors within TypoScript.

Analyzing defined constants

The TypoScript Object Browser provides an tree view to all defined constants on the currently active page.

Overview of the defined constants

Finding errors

There are no tools that will tell whether the given TypoScript code is 100% correct. The TypoScript Object Browser will warn about syntax errors though:

The TypoScript Object Browser showing a syntax error

Errors will also appear in the Template Analyzer, when viewing the content of a give template. It is also possible to see the full TypoScript code by clicking on the "View the complete TS listing" button at the bottom of the Template Analyzer:

The TypoScript Object Browser showing a syntax error

The result is a long listing with all compiled line numbers, which makes it possible to find the error reported by the TypoScript Object Browser.

The TypoScript Object Browser showing a syntax error

In the frontend, the Admin Panel is another possibility to debug TypoScript; use its section called "TypoScript". It shows selected rendered (configuration) values, SQL queries, error messages and more.

Debugging

TypoScript itself offers a number of debug functions:

  • stdWrap comes with the properties debug, debugFunc and debugData which help checking which values are currently available and which configuration is being handled.

  • TMENU comes with the property debugItemConf. If set to 1, it outputs the configuration arrays for each menu item. Useful to debug optionSplit things and such.