VC++ Debugging

Started by
3 comments, last by S1CA 17 years, 6 months ago
Hi, i'm debugging a program and in the middle of the program i get a messege that i wrote too much (overwrote) into a std vector. it told me that the error occured on line 757 of the vector.h file. is there any way to know were it happened in the program - ie: what vector was overwritten? Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Advertisement
Run the code in the debugger, when it asserts, look at the call stack window.

http://msdn2.microsoft.com/en-us/library/a3694ts5.aspx

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Thanks, but how to i get the call stack window? I went to Debug->Windows on the menu and didn't see anything. i also couldn't find it in Tools->Import and Export Settings.
Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
In VC2005 It's at Debug->Windows->Call Stack. The menu is basically split into 4 sections, Call Stack is at the top of the third section. You can also do Ctrl-Alt-C.

Once you see the stack you can double click any function to jump to it and look at locals, etc.
-Mike
The "Call Stack" item only appears on the Debug -> Windows menu when you're in a debugging session (i.e. Debug -> Start Debugging) and the call stack window only contains anything when your program is stopped in the debugger as the result of an unhandled exception, hitting a breakpoint, or being stopped through code such as happens when you choose to 'debug' when you get an assert.

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement