How to find the line / method that caused debug approval error in Visual C ++

I am working on a program that sometimes generates debug statement errors on vectors, more specifically errors:

Expression: vector iterator is not unsolvable

The problem is that I do not know the line or method where this error occurs. I would prefer not to manually jump / break through my program until an error occurs. I am looking far to find the line number or at least the method causing this error.

I am using VS2010

early

+4
source share
1 answer

When it works, click "try again" and then "break." Then take a look at the stack trace and go down until you get the code in the code. This will show you what is the last place in your code that gets called before the crash.

+6
source

All Articles