Skip to content

Debug and Tester Modes

Daniel Pimley edited this page Jul 2, 2016 · 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 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 a variety of internal operations and failure states to the file error_log.txt in the install directory.

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