Skip stl code when debugging

  • Thread starter Thread starter Torben Laursen
  • Start date Start date
T

Torben Laursen

Hi

Is there a way to prevent the debugger from stepping into the stl code when
I am debugging my code?

Thanks Torben
 
Is there a way to prevent the debugger from stepping into the stl code
when I am debugging my code?

Yes. select 'step over' instead of 'step into' when debugging.
I use the VC6 keybindings. For me stepping over is F10, Stepping into is F11
That way you will not go down into STL code.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
If I remember correctly there was an option to automatically step over
specific functions. I don't remember where....

QbProg
 
Bruno said:
Yes. select 'step over' instead of 'step into' when debugging.
I use the VC6 keybindings. For me stepping over is F10, Stepping into is F11
That way you will not go down into STL code.

Sometimes it is desirable to step into your function, but not into the
STL. For example:

void CallToDebug(std::string s)
// Note that I'm intentionally passing the string by value here,
// in order to force the debugger to step into STL code, just to
// demonstrate the problem
{
}

void Testing()
{
std::string s;

/* breakpoint: -----> */ CallToDebug(s);
}

In this case, I don't care about stepping into std::basic_string's copy
constructor, I'd rather skip it and go directly to CallToDebug (I'm not
interested in debugging the STL). Visual Studio might have this feature,
I can't tell for sure.

However, if you accidentally step into an STL function, you can always
hit Shift+F11 (Debug | Step Out) to leave quickly, followed by another
F11 to step into the function that you really wanted to debug. That's
what I do in those rare cases when an F11 leads me right into an STL
header file.

Tom
 
Is there a way to prevent the debugger from stepping into the stl code when
I am debugging my code?

There are two options:

1) NoStepInto feature can be used to disable stepping into some predefined set of functions:
http://blogs.msdn.com/andypennell/archive/2004/02/06/69004.aspx

2) R-Click + "Step Into Specific" menu allows to choose what function to step into
when the code is about to call a function, as in the case described by Tamas.
 
Back
Top