
144
|
Chapter 5, Debugging
#36 Set Breakpoints
HACK
The New Breakpoint dialog has four tabs:
Function
Used to add a breakpoint to a specific line of a specific function.
File
The tab shown in Figure 5-2; adds a breakpoint to a specific line in a
specific file in the solution.
Address
Adds a breakpoint to a specific memory address. Commonly used when
debugging unmanaged code.
Data
Used to add a breakpoint on a variable. When the variable changes, the
breakpoint will be hit. Data breakpoints can be used only when debug-
ging unmanaged code.
To add a breakpoint to a specific line of code, use the File tab. As Figure 5-2
shows, the File tab prompts you for the file and the line number for the
breakpoint.
Enter Break Mode When a Function Is Called
In addition to being able to break on a particular line of code, Visual Studio
makes it easy to break when a particular function is invoked. From the
Figure 5-2. New Breakpoint dialog—File tab