Using the CallStack Window

The CallStack window shows a list of active, or uncompleted, procedure calls. The procedure containing the currently executing line of code is called the current procedure. This procedure determines the scope of variables in the Watch window and the Immediate window.

The CallStack window helps you trace the operation of an application as it executes a series of nested procedures. For example, an event procedure can call a second procedure, which in turn can call a third procedure—all before the event procedure that started this chain is completed. Such nested procedure calls can complicate the debugging process, so the CallStack window keeps track of the past calls and the current procedure for you. The CallStack window removes procedures from its list after they have finished.

The CallStack window is unavailable while an application runs. It displays the list of procedures only while your application is stopped at a breakpoint. The currently executing procedure is shown with a yellow arrow. To see the place in code where a procedure was called, double-click the procedure below it in the call stack. The CallStack window and the Code window show the selected nested procedure call with a green arrow and the current procedure call with a yellow arrow. In addition, the code window containing that procedure becomes active and displays the line of code that called the current procedure with a green arrow.