Step Executing a Script

From RapidSQL
Jump to: navigation, search

Go Up to Execution and Execution-related SQL Editor options

Step execution of scripts is an invaluable method to debug your scripts. The Step Execution facility lets you step through each batch in your script. While some batches can include many lines of code, some batches can consist of one line. The Step Execution facility parses the statements and moves from batch to batch during the step execution process, each step controlled by you clicking the step execution button.

To use the Step Execute Facility

  1. Open a script. For details, see Opening Files.
  2. On the Query menu, select Step-Execute.
    The procedure starts to execute and displays errors at the bottom of the Editor window. A toolbar offering subsequent step execution actions opens:
    at170fe6.jpg
    Note: Each executing line is indicated with a yellow arrow in the gutter of the Editor window. The gutter is that gray area between the line numbers on the left and the code window. As you step through your batches, the arrow moves to indicate your current location.
  3. Use the following table as a guide to subsequent actions you take:
Feature

Step

Click the Step button to step into the next batch of code.

Step Back

Click the Step Back icon to step back to the most previous batch of code.

Step Over

Click the Step Over icon to jump over a batch to the next batch.

Run to Cursor

Click the Run to Cursor icon to execute all of the code between the beginning of the script to wherever you have inserted the pointer.

Cancel Step Execution

Click the Cancel Step Execution icon to change to regular execution mode.

SQL Begin Transaction

Toggles the Begin Transaction status on and off.

SQL Rollback

Performs a rollback on the current transaction.

SQL Commit

Commits the current transaction.

Keep the following in mind when using this feature:

ISQL Window Gutter

The ISQL Window Gutter is a vertical gray display bar located to the left of the ISQL window. It includes location indicators such as line numbers, error indicators, and bookmarks. The gutter is a quick visual cue to your current position in the script.

Script Line Numbers

Line numbers are included to let you navigate large scripts. Error messages in the output window indicate the line number where the error occurred.

Automatic Error Flagging

When using the Step Execution mode, errors are flagged with a red dot in the ISQL window gutter. The errors are flagged sequentially as they are stepped into.

Point and Click Error Navigation

Errors are displayed in the output window at the bottom of the screen and selects the errors as they occur. You can click each error and be taken directly to the line where that error occurred.