Is there a way to automatically avoiding stepping into certain functions in Visual Studio?

I found this blog entry which has a solution. Although I’d prefer to be able to say “don’t step into anything that isn’t part of this project”, this looks workable.

EDIT: After looking at a few blogs and newsgroups, the method is to add an entry for each function that you don’t want to step into under this registry key (assuming VS 2005):

32 bit Windows
    \\HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0\NativeDE\StepOver
64 bit Windows
    \\HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\8.0\NativeDE\StepOver

Version numbers for the path:

Visual Studio 2005: 8.0
Visual Studio 2008: 9.0
Visual Studio 2010: 10.0
Visual Studio 2012: 11.0
Visual Studio 2013: 12.0

This key contains a set of rules which affect how stepping is performed. Each rule is specified as a separate entry whose name is a decimal number and whose value is a function name pattern that specifies which functions we want to affect. e.g.

    "10" = "boost\:\:scoped_ptr.*\:\:.*=NoStepInto"

prevents stepping into boost::scoped_ptr functions.

The rules are evaluated from high to low values until a matching pattern is found, or there are no rules left. In that case the function is stepped into.

Function names are regular expressions.

Colons need to be quoted with a backslash.

You can specify StepInto as well as NoStepInto. This gives you a way to avoid stepping into all but a few functions in the same scope/namespace.

Restart Visual Studio to pick up the changes to the registry.

Leave a Comment