Before going further, display the Debug toolbar. From the View
menu, choose Toolbars and then Debug to display
the Debug toolbar. (As you debug, the toolbar can float, or you
can dock the toolbar to the upper toolbar area.) When you need
to see where the program's execution has been up to a breakpoint,
you can use one of the most useful features-the Call Stack. Click
the toolbar's Call Stack button. As Figure 36.5 shows, the Call
Stack dialog box appears and shows your program's execution, procedure
by procedure, until its current position.
The Call Stack dialog box retraces your program's procedures.
If you see a Call Stack entry labeled [<Non-Basic Code>], execution occurred from another source, such as the GetCursorPos() Windows API call described in Hour 35, "Integrating Code."
![]()
If you want to show one of the Call Stack dialog box's procedures, double-click that entry and Visual Basic takes you to that procedure. From there, you don't just look at code, but at live values as well. Keep in mind that the application is in a breakpoint stage still, so you can view the values of any variable (or named literal) within that previous procedure.