-
Print statements inserted
into the program code can
print out
the values of
critically important variables
- When a program runs, the
listing of variable values can
expose the
logic of the
program
(and in doing so, may
expose
bugs in your
code)
- Once the
print statements are
inserted into the
program code, it may be
difficult to
remove them...
- My favorite
coding aid is:
- Use
#ifdef clauses
to enable/disable
printf( ) statements
|
- I often used
different
debug macro names
to selectively
activate/deactivate
print statements that
tracks
different sets of
variables
|