Debugging
To debug is human. To fix it is divine...
Well, the human part is what this section is about. The divine part is up to you!
When a program does not behave in the way it is supposed to, we say the program contains a bug. A bug is not a compilation error — compilation errors are relatively easy to clear, because the compiler tells you where the problems are. By contrast, bugs are errors that happen during program execution and they can be hard (sometimes very hard!) to detect.
Any program that you think is bug-free is never completely bug-free. All we can try to do is to reduce the number of bugs contained in the program. The process of removing bugs is known as debugging, and the tool that is used for debugging is called the debugger. Anjuta provides a very user-friendly and powerful debugging environment (actually, a GUI wrapper over gdb, a powerful command line debugging tool and standard on Linux).
A debugger tracks and traces the execution of the program and provides various views of information needed to study the execution of the program.
- 6.1. Start and stop
- 6.2. Execution
- 6.3. Breakpoints
- 6.4. Expressions
- 6.5. Stack Trace
- 6.6. Thread
- 6.7. CPU
- 6.8. Others
