Chapter 8. When Problems Hide: Getting More Information
Sometimes code does not trigger a debug page to be displayed, but it also does not produce the correct results. In fact even when code does seem to be working correctly, at least in terms of the visible results shown in the browser, behind the scenes it may be doing unexpected things that could lead to trouble down the road. For example, if a page requires many (or very time-consuming) SQL queries, then it may seem to be working fine during development but then quickly cause server overload in a production environment.
It's good practice, then, to get into the habit of checking up on how code is behaving, even when external results are not showing any problems. First, this practice can reveal hidden problems that are best known about sooner rather than later. Second, knowing what the normal code path looks like is very valuable when tracking down where things have gone wrong when a problem does crop up.
This chapter focuses on ways to...