Chapter 3

Stopping and Inspecting Your Code

IN THIS CHAPTER

check Setting, enabling, and disabling breakpoints

check Temporarily setting or disabling a breakpoint

check Inspecting a variable

check Watching any or all local and global variables

Sometimes, code breaks. The word break has different meanings among the people using it in the coding world. When programmers talk about breaking the code, it may mean that the programmer made a mistake and the code no longer works. It could also mean that a change in a library causes the code to malfunction despite a lack of errors caused by the programmer. But this chapter uses a different definition for break. When you’re debugging an application, you can have the application run until it gets to a certain line in the code. The debugger then stops at that line, and you can look at the values of variables, inspect the code, or even change the variables. When the application stops, that’s called breaking. It stops on that particular line because you put a breakpoint on that line.

This chapter discusses setting and manipulating breakpoints in your code (if nothing ...

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.