Viewing the Call Stack

While debugging scripts, you can see a list of procedures (subroutines, functions, event handlers, and other scripts) that are currently loaded. Each time a procedure is called, the name of the called procedure is added to the top of the call stack. When the procedure ends, its name is removed from the call stack.

Viewing the call stack can help you trace the course of execution through a series of nested procedures. You can also use the call stack to navigate within the document to a specific procedure. When you navigate to another procedure, you can set breakpoints there, query variable values, and so on.

However, using the call stack to navigate to another procedure does not change the currently executing line. Even if you set a breakpoint or variable value in another procedure, execution resumes from the line where it was halted. You can query variables for the currently selected procedure in the call stack. However, if you change a variable value or execute a command in the Command window after navigating to another procedure in the call stack, the context of the command is still the procedure where you are halted.

When you are debugging Java applications, the call stack includes currently loaded Java class methods. You will therefore see a mixture of procedure names from VBScript or JScript and the names of Java class methods. For more information, see Using the Call Stack in Java Applications.

To view the call stack

To jump to a specific procedure

See Also

Debugging Java Applications

Executing Script Commands


© 1997 by Microsoft Corporation. All rights reserved.