When you have a bug in your code that causes a crash, a thrown exception, and so on, Visual Studio will attempt to halt execution of code and will allow you to inspect the code. The place at which Visual Studio halts won't always be the exact location of the bug, but it can be close. It will at least be at a line of code that doesn't execute properly.
Finding bugs and using call stacks
Getting ready
In this recipe, we'll describe the Call Stack, and how to trace where you think an error may come from. Try adding a bug to your code, or adding a breakpoint somewhere interesting where you'd like to pause for inspection.