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