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:
- 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
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.
- Once the project is in break mode, do one of the following:
- Click Continue on the Debug tab to resume execution and continue to the next break point.
- Check the Database Spy window to see the current state of the project. For more information, see Observe the current state in the Database Spy window.
- Click Step Into, Step Over, or Step Out on the Debug tab to step through the code one line at a time. For more information, see Step through your VBScript code.
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
- Repeat the previous step as desired.
- When you have finished debugging your code, click Stop on the Debug tab.