20

I want to skip debugging all of std:: namespace C++ by default, without code window changing to std:: code , authored by Microsoft as xstring . This question is similar to : How to skip common classes in VS 2008 when stepping in? and Auto-skip STL functions during step-by-step debugging in MSVC++2010 . The only difference is that their solution are for visual studio 2008 and 2010. I tried it myself , and it works on visual studio 2010, but I want to do it on visual studio 2013. The same solution doesn't work on visual studio 2013. I tried changing all values in registry equal to :

_RTC_CheckEsp

to

std\:\:.*=NoStepInto

, some of these were values were for visual studio 12.0 ( which is visual studio 2013) , but after restarting visual studio 2013, nothing changed. On the contrary this works on Visual Studio 2010. "Just My Code" option is turned on.

Community
  • 1
  • 1
Mohamed El-Nakeep
  • 6,580
  • 4
  • 35
  • 39
  • 4
    Turn on the Just My Code option. Edit the [.natstepfilter](http://msdn.microsoft.com/en-us/library/dn457346.aspx#BKMK_C___Just_My_Code) files to add exclusions. – Hans Passant Feb 17 '14 at 18:33
  • similar to http://stackoverflow.com/questions/12550412/has-the-vs2012-nativede-stepover-registry-entry-that-prevents-step-into-for-spec – Mohamed El-Nakeep Feb 17 '14 at 23:20

1 Answers1

25

As Hans Passant said, Edit the .natstepfilter files to add exclusions.

create a new file for example nostd.natstepfilter and write in it as in Has the VS2012 NativeDE\StepOver registry entry that prevents step-into for specific functions changed format?

 <?xml version="1.0" encoding="utf-8"?>
 <StepFilter xmlns="http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010">
   <Function><Name>std::.*</Name><Action>NoStepInto</Action></Function>
</StepFilter>

For a 64-bit windows, move the file to :

 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Packages\Debugger\Visualizers

while for a 32-bit windows to:

 C:\Program Files\Microsoft Visual Studio 12.0\Common7\Packages\Debugger\Visualizers

or whatever you customized you installation to. Please note that natstepfilter does not work in mixed mode (mixing native and managed code). Ensure that your project debugging settings is set to Native only

Community
  • 1
  • 1
Mohamed El-Nakeep
  • 6,580
  • 4
  • 35
  • 39
  • 9
    You can also put your .natstepfilter files in your user profile directories, like .natvis files. ` %USERPROFILE%\My Documents\Visual Studio 2012\Visualizers\ ` Useful if you don't have admin access or just want to keep the installation dir clean. – StarlitGhost Jul 21 '15 at 09:58
  • 1
    This works for Visual Studio 2015. This is probably the most useful one line change you could to for your C++ debugging experience (especially if you use smart pointers). File is found at ```C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers``` – David Mar 26 '17 at 22:42
  • Turns out you don't want to filter out everything (like std::function) so how do you specify certain things? I'm trying to filter out std::string and std::basic_string.*, std::string.* and std::xstring.* are not filtering it out. – stu Mar 15 '18 at 16:02