Sign in to follow this  
zedz

MSVC debugging no STL

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Quote:
Original post by zedz
HKEY_CURRENT_USER\Software\Microsoft\ ( VCExpress\8.0 ) \NativeDE\StepOver
10 ................ stl\\:\\:.*=nostepinto
Wow, you learn something new every day!

But shouldn't that be:

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

?

Share this post


Link to post
Share on other sites
yes youre right, I get confused between STL + STD, personally I dont know why they choose std::, stl seems to make more sense,
you would thing you would wanna avoid std's

Share this post


Link to post
Share on other sites
Quote:
Original post by Red Ant
Well, I think the official term is now SCL (Standard C++ Library).

P.S. Or is it?
Since both 'stl' and 'std' turn up C++ standard library-related responses on google, and 'scl' doesn't, we can at least say it hasn't caught on [wink]

Share this post


Link to post
Share on other sites
The std namespace is for anything that's in the standard (hence std) library. That includes things like iostreams that are not part of the STL. The STL is just the containers/iterators/algorithms/functors part of the standard library.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this