Easier debugging stl array
In MSVC++ I have a vector.
Whenever you go out of bounds of the vector (in debug mode, launched as "Start Debugging"), when you step out of bounds of the vector the program halts with a dialog box:
Microsoft Visual C++ Debug Library ==== Debug Assertion Failed! Expression: Vector subscript out of range Abort | Retry | Ignore
So what I want though is the MSVC++ debugger within visual studio to STOP AT THE LINE WHERE THE OUT OF BOUNDS OCCURRED, not give me this dialog box.
How can I cause the program to "break" properly and be able to step t开发者_如何转开发hrough code /inspect variables when an out of bounds occurs on an STL vector?
Usually with Visual Studio you have the 'Retry' option. That will bring the debugger to the line or area to where your application died. Then you can check the stack trace and see why you went out of bounds.
精彩评论