Setting a Breakpoint on a Class
General: CTRL + B
Visual Basic 6: CTRL + B
Visual C# 2005: CTRL + B; CTRL + D, N; CTRL + D, CTRL + N
Visual C++ 2: [no shortcut]
Visual C++ 6: CTRL + B
Visual Studio 6: [no shortcut]
Windows: ALT + D, B, F
Menu: Debug | New Breakpoint | Break at Function
Command: Debug.BreakatFunction
Versions: 2005, 2008, 2010
Languages: C++ (native)
Code: vstipDebug0040
In Native C++ you can set a breakpoint on every function in a class very quickly. This can be very useful if you want to make sure that any calls to your class can be examined. It’s also helpful for finding out which objects may be calling your class as well.
Here is a quick look at my class:
You begin by making setting a Function Breakpoint (CTRL + B) in your code:
To set a Breakpoint on every function of a class you put in the name of the class and an asterisk for the function name:
After you click the OK button take a look at the Breakpoints Window you will initially see only one Breakpoint:
Also, there will be no glyphs to indicate any breakpoints have been set in your code:
But the first time you run any code that calls into the class:
The call to any function will cause you to enter Debug mode and the Breakpoints Window will show a Breakpoint for every function that is called:
Note the absence of the MoreStuff and LotsOfStuff functions since they were not called in the code. While in Debug mode you will also see a Breakpoint Glyph appear next to functions that the code will break at:
However when you stop debugging the glyph(s) will go away: