The Call Stack

As you step in and out of methods, the Call Stack window keeps track of the order and hierarchy of method calls. If you look back at Figure 10-2, you’ll see the Call Stack window in the lower right-hand corner of the application. Figure 10-12 shows a close-up picture of the Call Stack window. You can see that the Time constructor was called by the Run() method, while the Run() method was in turn called by Main().

The Call Stack window

Figure 10-12. The Call Stack window

In this case, if you double-click on the second line in the Call Stack window, the debugger shows you the line in Run() that called the Time constructor, as shown in Figure 10-13.

Tracing the call stack

Figure 10-13. Tracing the call stack

Get Learning C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.