16

How can I skip common classes in VS 2008 debugger when stepping in?

For example, I do not want debugger to step into any of the std:: classes. How can I achieve that?

I've found ways of doing this in VS 2005 and earlier, but not 2008

BIBD
  • 15,107
  • 25
  • 85
  • 137
BarsMonster
  • 6,483
  • 2
  • 34
  • 47

2 Answers2

17

You can do this by entering entries into the registry (I know, it sucks). The key you are looking for varies from 32 to 64 bit systems. For 32-bit systems the key is

HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\NativeDE\StepOver

If you're running a 64 bit OS and a 32 bit Visual Studio the key is

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\NativeDE\StepOver

The Wow6432Node key is a key present for 32 bit applications running on 64 bit systems. (Sidenote: searching the registry for "_RTC_CheckEsp" probably will lead you to the right place, it's a default entry in Visual Studio 9)

The syntax should be familiar to you, but as an example, a simple entry could be string value boost::.*=NoStepInto which will avoid the debugger to step into Boost. See http://www.cprogramming.com/debugging/visual-studio-msvc-debugging-NoStepInto.html for some other examples.

Hope this helps :)

larsmoa
  • 12,604
  • 8
  • 62
  • 85
  • 1
    Thanks, that is exactly what was needed. Used this std\:\:.*=NoStepInto to skip all STL stuff :-) – BarsMonster Jan 14 '10 at 09:09
  • 2
    So useful... Works for VS2010 as well (use `VisualStudio\10.0\NativeDE`) I really think this answer is underrated... :) – Hertzel Guinness Jun 13 '11 at 10:59
  • +1 Thanks so much! I found another description and it just didnt work, I needed the "Wow6432Node"... – Philip Daubmeier Jan 07 '13 at 15:53
  • 1
    Thanks! Works for visual studio 2010, but doesn't work for visual studio 2013. All you have to do for it to work in vs2010 is to change all your _RTC_CheckEsp to std\:\:.*=NoStepInto (there is one or two for every Visual studio installed) or change 9.0 to 10.0 in registry path – Mohamed El-Nakeep Feb 17 '14 at 17:54
0

Taken from http://www.highprogrammer.com/alan/windev/visualstudio.html:

Avoiding Stepping Into Things

It's often useful to avoid stepping into some common code like constructors or overloaded operators. autoexp.dat provides this capability. Add a section called "[ExecutionControl]". Add keys where the key is the function name and the value is "NoStepInto". You can specify an asterisk (*) as a wildcard as the first set of colons for a namespace or class.

autoexp.dat is only read on Visual Studio's start up.

To ignore the function myfunctionname, and all calls to the class CFoo:

[ExecutionControl]
myfunctionname=NoStepInto
CFoo::*=NoStepInto

To ignore construction and assignment of MFC CStrings: (Notice the extra = in CString::operator=.)

[ExecutionControl]
CString::CString=NoStepInto
CString::operator==NoStepInto

To ignore all ATL calls:

[ExecutionControl]
ATL::*=NoStepInto 
dalle
  • 18,057
  • 5
  • 57
  • 81
  • autoexp.dat is parsed every time the debugger starts. – Nikola Smiljanić Jan 14 '10 at 08:30
  • 1
    I've seen this page, and just tried it again. It does not work, here is what I've found about it: Now, it used to be 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. But I don't see a registry key for that, there is nothing similar to 2005's HKLM\Software\Microsoft\VisualStudio\8.0\NativeDE\StepOver :-S – BarsMonster Jan 14 '10 at 08:31