I am debugging a C/C++ code with Visual Studio. There is a loop called 10000 times and in one of the interactions, at the end of the loop, there is an error, as the program tries to access the N+1 value of an array of length N. I want to go back and debug the origin of the error and I wonder if somehow Visual Studio, in debugging mode, can highlight visually or tell me which lines of the source code were executed. Then it would be easier to find the error. Does anybody know if this is possible?
If this is not possible with VS, what other approaches could do this?
Thanks
EDIT: I also wonder if this could be done with any other IDE (Eclipse, Xcode, command line, etc)
put a conditional breakpoint where the array access is happening. That way your program will break on the N+1th access and you'll have the complete stack trace to work with.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With