Run your project in Debug mode

Run your project in Debug mode in order to use the other debugging tools.

A project can be run either in normal Run mode or in Debug mode. You must run your project in Debug mode in order to use the other debugging tools such as break points, stepping, and the VBScript-specific tabs in the Database Spy window.

To run your project in Debug mode:

  1. On Debug tab of the ribbon, in the Local Management group, click Debug. The project runtime is started in Debug mode. If the Debug Viewer option (on the Debug tab , in the Debug Options group) is selected and the Viewer task is set to start up, then the Secure Viewer is also started.
    Note: When a project is run locally, the standard Viewer is normally used. In contrast, when a project is run in Debug mode, the Secure Viewer is used for better thread and process management.

    The VBScript code is executed up to the first break point that you set, assuming you set break points. (The “first” break point is the first one that comes in the logical, sequential execution of the code, not literally the first one that you set.) At that point, the project automatically enters break mode: execution is suspended and a yellow arrow is displayed in the VBScript interface to show exactly where in the code that execution was suspended.

    Figure 1. The yellow arrow shows where execution was suspended
    Web Studio Help illus vbscript debugging 3 Run your project in Debug mode

    If you did not set break points, then the project will continue to run until you click either Stop (to stop the project runtime) or Break (to manually enter break mode) on the Debug tab.

  2. Once the project is in break mode, do one of the following:
    Note: While your project is in break mode, you can hover the mouse pointer over any VBScript variable in the code to get the current value of that variable. The value is shown in a pop-up box.
    Figure 2. Current value of VBScript variable in a pop-up box
    Web Studio Help illus vbscript debugging 5 Run your project in Debug mode

  3. Repeat the previous step as desired.
  4. When you have finished debugging your code, click Stop on the Debug tab.
CAUTION:
When you run a project in Debug mode, you will not be able to stop it until the project’s Startup Script has been completely executed.

Run your project in Debug mode