Writing a program for debugging
You can make your programs easier to debug by following these simple guidelines:
- Do not hand-tune your source code for performance until you have fully debugged and
tested the untuned version. Hand-tuning may make the logic of your code harder to
understand.
- Where possible, do not put multiple statements on a single line, because some
Distributed Debugger features operate on a line basis. For example, you cannot step over
or set line breakpoints on more than one statement on the same line.
- Assign intermediate expression values to temporary variables to make it easier to verify
intermediate results by monitoring the temporary variables.
To debug programs at the level of source code statements, you must specify the compiler
options that generate debug information. In some cases, you must specify additional
options that enable the debug engine to work properly with your code.