Chapter 2

Debugging an Application

IN THIS CHAPTER

check Working with debuggers

check Tracing code flow through an application and in and out of functions

check Getting seriously advanced debuggers

check Adding command-line arguments to Code::Blocks debugging

In this chapter, you discover how you can use a debugger to track down problems and bugs in your application. Sooner or later, things don’t work the way you planned them. In this case, you have several plans of attack. One is to use a debugger to try to fix the application, which is the approach taken in this chapter. You could also use cause-and-effect analysis, probabilistic analysis, or logging application output. You can find articles online that describe all sorts of techniques, such as this one: https://dev.to/nikpoltoratsky/debugging-you-re-doing-it-wrong-10-techniques-to-find-a-bug-in-your-code-4f41. However, this chapter relies on the old standby of debugging and focuses on the Code::Blocks debugger.

Remember You don’t have to type the source code ...

Get C++ All-in-One For Dummies, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.