How to avoid unwanted stepping in debugging with visual studio

It is always annoying when you are debugging with visual studio, you press F11 on a standard MFC or STL object and the control goes to the constructor or assignment operator of that standard class.

Eg:

string myStr = “This is my string”;

If you press F11 on the above line, it will go to the assignment operator implementation of std::string class.

To avoid such unwanted stepping into the assignment operator implementation, edit AUTOEXP.DAT , found in the Bin folder of MsDev directory and add the following line.

[ExecutionControl]

std::string::operator==NoStepInto

To avoid stepping into the constructor of string, you can add a line as follows.

[ExecutionControl]

std::string::string=NoStepInto

If you want to disable stepping into all the functions of the class CMyClass,

[ExecutionControl]

CMyClass::*=NoStepInto

If you want to disable stepping into all the functions of classes in the namespace MyNameSpace,

[ExecutionControl]

MyNameSpace::*=NoStepInto

One Response to “How to avoid unwanted stepping in debugging with visual studio”

  1. Stepping Over Unwanted Functions While Debugging « Tweaker Says:

    [...] that to achieve that you used the [ExecutionControl] section in autoexp.dat, and seems it is widely believed to still hold. However, since 2003(!) the home of these setting is the registry. Since VS2005, its [...]

Leave a Reply