-
-
Notifications
You must be signed in to change notification settings - Fork 57
Debug and Tester Modes
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 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.
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.
This is the wiki for Chyrp Lite: An ultra-lightweight blogging engine, written in PHP.
- About Permissions
- Tour of a Theme
- Twig Reference
- Twig Variables
- Object Attributes
- Routes and Controllers
- Making Your First Module
- Debug and Tester Modes
- About Errors
- Introduction to Helpers
- Introduction to Translations
- Introduction to Triggers
- Anatomy of info.php Files
- Anatomy of a Feather
- Anatomy of a Module
- Anatomy of a Theme
- Anatomy of a Post
- Localizing Extensions
- Adding Ajax Functionality
- Working with JavaScript
- Working with Model
- Working with Config