MSVC debugging no STL

Started by
14 comments, last by stonemetal 14 years, 9 months ago
How can I disable stepping through the STL files(*) when Im debugging a program. eg */ breakpoint */ F11 (step into) + it enters some STL file eg vector(.h), repeat this step a few times until finally Im in my code that I want to look at The reason being is 99.9% of the time the STL file has no relevant info thus Im wasting time cheers zed (*) or something else, i.e. can I mark some files with a flag saying, ignore these.
Advertisement
I don't think you can. But if you don't want that behaviour, you shouldn't be using "step into". "Step over" will execute the code line by line and won't drill into functions, and "step out" will execute until the call stack is popped.
NextWar: The Quest for Earth available now for Windows Phone 7.
Yeah, I usually use F10 (step over) unless I explicitly want to step in (F11). If I accidentally step into a function I didn't mean to, Shift-F11 (step out) will continue execution until the current function ends.
I'm fairly certain that zedz is referring to cases like this:

std::vector<int> v;
// stuff
someFunc(v[0], v[1], v[2], v[3]);

Where hitting F11 on someFunc will indeed first step into operator[] four times. The fastest way around this is to put a breakpoint on the first line inside the function you're interested in and do F10, so it steps over all the vector code and breaks inside your function, but I agree it can be rather annoying sometimes, especially if your code is SC++L-heavy.

I vaguely remember there being a file somewhere that let you edit the debugging behavior of certain types and how they're displayed in the watch window, but it's been forever since I've messed with that and my Google-foo is weak this late in the evening.
Zipster yes thats the case Im talking about
Yes I could put a breakpoint at the place I want to look at, but the thing is often I dont know exactly what I want to look at, one thing I certainly dont want to look at is STL header files :)

Im pretty sure this would be able to be done as its a commonsense improvement, the problem is as Ive found some of msvc features are undocumented for some reason

cheers anyways
which version? in 2005+ there's an option called "Just my code"
Quote:
To enable or disable Just My Code debugging
On the Tools menu, choose Options.

In the Options dialog box, open the Debugging node and then choose General.

Select or clear Enable Just My Code.




if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
Quote:Original post by ChaosEngine
which version? in 2005+ there's an option called "Just my code"
That's managed code only, it doesn't work for (native) C++.
There are lots of neat little (undocumented) things you can do with Visual Studio's autoexp.dat file. One of these is NoStepInto, as explained here.

Edit: Looks like that was a VS6.0 only trick, it's now been moved to the registry.
Quote:Original post by Codeka
Quote:Original post by ChaosEngine
which version? in 2005+ there's an option called "Just my code"
That's managed code only, it doesn't work for (native) C++.


D'oh! you're right. For some reason, I was sure it worked for native C++.

Driv3MeFars solution should work though.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
thanks Driv3MeFar that worked a treat, I wish Ild known of it earlier

heres what u need

HKEY_CURRENT_USER\Software\Microsoft\ ( VCExpress\8.0 ) \NativeDE\StepOver
10 ................ stl\\:\\:.*=nostepinto

obviously u need to change whats in the ( ) depending on your VC version

This topic is closed to new replies.

Advertisement