While debugging i press F11 often to step into a function. For this project i use properties everwhere which is simply a RAII wrapper that checks if i have set the variable and gives me an assert if i have not. Its been useful.
However now debugging is annoying since F11 will step into the property. Can i skip it somehow? by writing attributes, keywords or anything?
I am using VS11beta
This is quite easy to set up when you’re dealing with managed code. You can manually mark the function with the
DebuggerHiddenAttributeclass, and even turn on built-in debugger settings like “Step over properties and operators”.Unfortunately, automatically stepping over a particular function is not supported by Visual Studio for native C++ code. (At least, it wasn’t supported up until VS 2010—I haven’t had enough time to play with VS 11 to see if this is something they gave us to make up for the fact that they stole all our colors.)
There is a workaround, though, documented a long while ago on Andy Pennell’s blog:
How to Not Step Into Functions using the Visual C++ Debugger
Essentially, you edit the following registry key (for VS 2010):
or for 64-bit applications:
to specify a regular expression that will be matched against functions by the debugger.
For example, if you don’t want the debugger to step into overloaded operators, you can use the following expression:
As the disclaimer in the blog post says: