- CMS Made Simple Development Cookbook
- Samuel Goldstein
- 343字
- 2021-04-09 21:13:19
Using CMS in Debug Mode
When you start developing extensions of any kind for CMS Made Simple, a certain amount of your development time will involve tracking down things that aren't working the way you expect them to. Happily, CMS Made Simple has some built-in tools for helping in the debugging process.
This recipe shows you how to run CMS Made Simple in debug mode, and gives you some idea of what to look for in debug output.
How to do it...
- Find your CMS Made Simple base install directory. Within that directory will be your install's
config.php
file. - Edit
config.php
and locate the following section# CMSMS Debug Mode? Turn it on to get a better error when you # see {nocache} errors, or to allow seeing php notices, warnings, and errors in the html output. # This setting will also disable browser css caching. $config['debug'] = false;
- Change the
"false"
to"true"
and save the file. - Browse through your site. At the bottom of each page will be the debug information:
How it works...
Debug mode causes CMS Made Simple to do a number of things differently than in normal production mode:
- PHP error reporting is changed to
E_ALL
, so warnings and errors will all be displayed. - Page and CSS caching is disabled.
- Page redirecting via the API is disabled; instead, a link is displayed that will lead to the original destination.
- All database interactions are displayed.
- Select core functions display diagnostic information
Often, the display of otherwise hidden warnings or errors will be sufficient for you to track down issues by revealing problems like typos in variable names, missing parentheses, or other syntax errors.
The display of database interactions is useful for diagnosing query problems. Ideally, of course, all extension code we write has proper error checking and reporting. If, however, our code isn't that robust (or if we're still in early development, when such error handling has not yet been added), debug mode helps us identify problems.

See also
- Chapter 10, Setting Special Diagnostic Messages for Debug Mode recipe
- IBM Cognos 8 Report Studio Cookbook
- Oracle Business Intelligence : The Condensed Guide to Analysis and Reporting
- Photoshop案例實戰從入門到精通
- Oracle VM Manager 2.1.2
- Authorware應用案例教程
- CAD/CAM技術與應用
- Drools JBoss Rules 5.0 Developer's Guide
- Tomcat 6 Developer's Guide
- Lighttpd
- AutoCAD 2017從新手到高手
- Capture One 22 Pro高級實戰教程
- Photoshop CC完全自學教程:從入門到實踐(全新版)
- AI繪畫與攝影實戰108招:ChatGPT+Midjourney+文心一格
- iPad Procreate風格繪畫之美
- 剪映真傳:88招玩轉短視頻剪輯