When we want a thread-centric view of our application, the Threads window is the place to start. We can use the Threads window to see the location of all of our threads, see the thread call stack, and more. We can use the Call Stack window to view the stack frames of our application, or the function, or procedure calls that are currently on the stack.
In this recipe, we are going to see how to use the Threads and Call Stack windows in Visual Studio 2012 to view the call stack information for the threads in our application.
Before we start looking at the debugging features of Visual Studio 2012, we need an application to debug. Let's create a Console
application that spins up a few tasks so we can take a look at their call stack information.
Start a new project using the C# Console Application project template and assign
LockExample
as the Solution name.Add the following
using
directives to the top of yourProgram
class.using System; using...