Step through your VBScript code

Use the Step Into, Step Over, and Step Out tools to step through your VBScript code one line at a time.

Your project must already be in break mode, either by reaching a break point that you set earlier or by using the Break tool to manually enter break mode, before you can use these tools.

Figure 1. Project in break mode, with yellow arrow showing where execution is suspended
Web Studio Help illus vbscript debugging 3 Step through your VBScript code

  1. To advance one step in the code, no matter what the step may be, click Step Into on the Debug tab. This always moves the debugger a single step forward. If the next step is a function call, then the function is called and execution is suspended again at the first step of that function. That is what “step into” means: the debugger steps into the called function. The yellow arrow is moved to show that the step has been taken.
    Figure 2. Yellow arrow showing one step forward
    Web Studio Help illus vbscript debugging 4 Step through your VBScript code

  2. To advance one step in the main script only, click Step Over on the Debug tab. If the next step is a function call, then the entire function is executed and the debugger continues with the main script. That is what “step over” means: the debugger steps over the called function in its entirety. The function is not skipped — it is still executed as written — but no additional time is spent stepping through it.
    Note: You should use this tool only when you have already debugged the function and you trust it to execute correctly.

    The yellow arrow is moved to show that the step has been taken.

  3. To finish executing a function and then continue with the main script, click Step Out on the Debug tab. That is what “step out” means: the debugger steps back out of a function that it has already stepped into. The function is not aborted — it is still executed as written — but no additional time is spent stepping through it.
    Note: You should use this tool only when you have already debugged the function and you trust it to execute correctly.

    The yellow arrow is moved to show that the step has been taken.

After every step, the Database Spy window is updated to show the current state of the project. For more information, see Observe the current state in the Database Spy window.

Step through your VBScript code