In addition to all the invaluable information provided by the debugger, you may on occasion want to generate your own debug output. For example, you may want to:
Check the values of variables within a loop.
Determine which code path or branch (perhaps in a series of <cfif> statements) is being followed.
Inspect SESSION or other variables.
Check for the presence of expected URL parameters or FORM fields.
Display the number of rows retrieved by a query.
Check the timing of a block of code.
This kind of information is useful in debugging logic problems—those annoying situations where code is valid syntactically, but some logic flaw (or unexpected situation) is preventing it from functioning as expected.
To insert your own information in ...