5

Is there a way to exclude boost source code (or any other) from debuging? I don't want to step into boost internal source code.

for example:

boost::shared_ptr<Xyz> xyz(new Xyz());
xyz->someMethod();

when I want to step into Xyz::someMethod() using F11 the debugger first steps into boost/shared_ptr.hpp before I get into Xyz::someMethod()

Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
Ingemar
  • 1,638
  • 2
  • 12
  • 15
  • 3
    Step in, step out, step in again. You get the same thing with functions with class parameters that have constructors. – crashmstr Jan 27 '12 at 17:38
  • 3
    yes of course I can step in and step out, but i want to avoid this. In eclipse I can exclude sorce code from debuging. – Ingemar Jan 27 '12 at 17:43
  • Answer for VS2010: [Exclude certain projects from stepping through during debug in VS2010?](http://stackoverflow.com/a/3878963/1441) – crashmstr Jan 27 '12 at 17:47
  • 2
    @crashmstr: That question and its answers refers to managed code (like C# or VB.NET). The situation is a little different with unmanaged C++. Find information about how to set up automatic stepping-over here: http://blogs.msdn.com/b/andypennell/archive/2004/02/06/69004.aspx – Cody Gray - on strike Jan 27 '12 at 17:50
  • Put in a breakpoint and hit continue. – Dennis Jan 27 '12 at 17:51
  • possible duplicate of [Is there a way to automatically avoiding stepping into certain functions in Visual Studio?](http://stackoverflow.com/questions/626744/is-there-a-way-to-automatically-avoiding-stepping-into-certain-functions-in-visu) – Ferruccio Jan 27 '12 at 18:44

2 Answers2

9

Launch regedit and navigate to the following key:

Under a 32bit OS:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\NativeDE\StepOver

Under a 64bit OS:

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

Create a new string value there. Name it as you wish. Enter this as a content:

boost\:\:.*

(You need to restart Visual Studio.)

tibur
  • 11,531
  • 2
  • 37
  • 39
  • 2
    if you are using Visual Studio Express the key is `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\10.0\NativeDE\StepOver` – Ingemar Jan 31 '12 at 09:17
  • This sounds like a nice solution, but today our helpful IT administrators just decided that launching `regedit` would be to dangerous for us noobs :-( -> +1 anyway – simo.3792 Jun 16 '15 at 04:50
3

For Visual Studio 2012:

As described here, this information is stored in the file C:\Program Files[ (x86)]\Microsoft Visual Studio 11.0\Common7\Packages\Debugger\Visualizers\default.natstepfilter

For boost::shared_ptr, this here has helped:

<Function><Name>boost::shared_ptr&lt;.*</Name><Action>NoStepInto</Action></Function>
Jan L.
  • 31
  • 2