Sign in to follow this  
Kest

Hardcore debugging with std

Recommended Posts

I'm trying to find ways to enable extreme validation for std::vector, std::string, and other standard objects while in debug mode build. For example, validation of the [] operators. Or just any operation that could be deemed unsafe. Would there be an easy way to switch this on? If not, then any advice on getting that working would be appreciated.

Share this post


Link to post
Share on other sites
That would be dependent on your standard library implementation. MSVC 2005 ships with a nice debug validation system, but for other compilers you can try using STLPort.

Share this post


Link to post
Share on other sites
I'm using MSVS version 7.1, but purposely accessing ranges way out of bounds of std objects while in debug mode doesn't seem to anger it.

Would I need to set this up?

edit: Meh, I'm ancient 2002 software. Forget that last comment. Thanks.

Share this post


Link to post
Share on other sites
I recommend 2005 as well. It has quite a bit more debug build validation of iterators and functions than 2003 did. I haven't tried to see what happens when purposely indexing out of bounds, but it has caught many other bugs for me when I switched from 2003 - 2005.

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