Skip to content

Debug and Tester Modes

Daniel Pimley edited this page Sep 14, 2019 · 18 revisions

If you want to develop an extension for Chyrp Lite, you should enable debug mode; this is done by setting the constant DEBUG to true at the very top of the file common.php:

define('DEBUG', true);

Debug mode

Debug mode sets PHP error reporting to E_ALL | E_STRICT and sets the Twig environment options debug and strict_variables to true to ensure your extension is following best practices for PHP and Twig development. Debug mode also causes Chyrp Lite to be more verbose, reporting backtraces if errors are encountered, and logging a variety of internal operations and failure states to the file error_log.txt in the install directory.

Tester mode

In addition to debug mode, Chyrp Lite has a mode suitable for automated testing; this is enabled by supplying the user-agent string "TESTER" when requesting web pages. In tester mode, errors and Flash notifications will be reported in a simple machine-readable format.

Clone this wiki locally