- 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
- 中文版3ds Max 2013-VRay效果圖制作從新手到高手
- Painter 現(xiàn)代服裝效果圖表現(xiàn)技法
- Software Testing using Visual Studio 2010
- After Effects全套影視特效制作典型實例(第2版)
- 人臉識別算法與案例分析
- 中文版 Photoshop CC 從入門到精通
- After Effects CC 2019 影視后期特效合成案例教程
- Adobe創(chuàng)意大學After Effects產(chǎn)品專家認證標準教材(CS6修訂版)
- ASP.NET jQuery Cookbook
- AutoCAD 2016中文版完全自學手冊
- Plone 3 Intranets
- Photoshop CC完全自學教程:從入門到實踐(全新版)
- Python氣象應用編程
- 中文版Photoshop CC 2018基礎培訓教程(全彩版)
- 剪映專業(yè)版:PC端短視頻制作(全彩慕課版)