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

Changed in version 12.0

The TypoScript management tools are now found in backend module Site Management > TypoScript. It was formerly found in "Page > Template".

The submodule Active TypoScript was renamed from "TypoScript Object Browser".

The backend submodule Site Management > TypoScript > Active TypoScript provides a tree view to all defined TypoScript Constants on the currently active page.

A Screenshot showing the "Constants" section of the "Active TypoScript" submodule.

Analyzing defined TypoScript Constants in the Active TypoScript submodule.

Finding errors

Changed in version 12.0

The TypoScript management tools are now found in backend module Site Management > TypoScript. It was formerly found in "Page > Template".

The submodule Active TypoScript was renamed from "TypoScript Object Browser". It does not display syntax warnings anymore, those are displayed in the submodule Included TypoScript only.

The submodule Included TypoScript was renamed from "TypoScript Analyzer".

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

The submodule 'Included TypoScript' showing a syntax warning

In the frontend, the typo3/cms-adminpanel 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.