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, change 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. If you 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 programs, the call stack includes currently loaded Java methods. You will therefore see a mixture of procedure names from VBScript or JScript and the names of Java methods.

To view the call stack

û or û

Click on the Debug toolbar.

To jump to a specific procedure

See Also

Debugging Java Programs

Executing Script Commands