Rules of Debugging
-
A computer always does exactly what you tell it to.
-
You probably have not found a bug in the compiler or language
-
If your program is doing something unexpected, check your values (output
them) throughout your program.
-
GIGO: Garbage In, Garbage Out. If your output is not what you expect,
for the program as a whole or for any part of the program, check your
inputs.
-
Manuals don't do you any good if you don't read them.
-
Knowing what the program does isn't good enough. You must also be able
to state what it should be doing, but isn't.
-
If you are absolutely sure that there is only one way to do what you
want, there is undoubtedly a much better way to do it.
-
If your program isn't working correctly, you are doing something wrong.
You cannot fix it by continuing to do the same thing.
-
One of the best debugging tools is pencil and paper.
Other debugging links:
http://geekswithblogs.net/sbargelt/archive/2005/05/14/39687.aspx
http://www.debuggingrules.com/Debugging_resources.html