|
 |
So, I have had to include a lot of output to the debug stream to inspect values
passed into macros, compare results of macros to tests done in other macros, and
inspect the code flow so that I can see how the logic of various test results
get directed.
Doing
#if (Test)
#debug (something)
#end
clutters the code, is tedious, and if everything is spread out all across the
code, it is a nightmare to turn on and off.
So what I did was test for a Global_Debug identifier, and if defined, then I
enable the #debug statements.
I do that by creating a macro called Debug ()
Then everything gets wrapped in Debug ( ), sans the #debug statement.
Then it's just one line, can be kept in the code, is trivial to turn on and off,
and all of the #if () #end stuff is in a single tiny macro.
It's simple, and I suppose obvious, but just thought I'd include it here in case
anyone derives benefit from it.
- BE
Post a reply to this message
|
 |