ScriptPro Editor

This topic is for use by scriptwriters who are using ScriptPro Editor to create custom scripts for their agencies.

Agents can go to Using ScriptPro Scripts for more information about using custom or standard scripts within Travelport Smartpoint.

 

Debugger/Replay

This section provides information about:

Replay overview

The ScriptPro Editor offers a method of recording the steps taken while running the script. After the steps have been taken, the recording can be replayed inside the Editor. This replay allows the developer to walk through each step of the code or create breakpoints to validate variables.

Note: Scripts compiled prior to ScriptPro Version 6.1 will not contain a replay info.

Replay menu

The Replay menu has the following options.

Menu option

Description

Load Replay File

Load the recorded file to be replayed through the code.

Start Replay

Begin the process of walking through the code.

Step Next

Move to the next step of the code.

Stop Replay

Exit the replay.

Toggle Breakpoint

Move to the next breakpoint.

Clear Replay State

Removes all the variables from the Autos Window in the Replay Results window.

Delete All Breakpoints

Removes all breakpoints from the Replay Results window.

Generate Replay Info

Begin the process of recording the replay.

Generate Replay Info

  1. From the Replay menu, select Generate Replay Info to begin recording.

    You can confirm that Generate Reply Info is turned on by opening the WKSTN.ini file. A new line will be added with GenerateReplayInfo equal to True or False based on the selection in the editor.

  2. In Smartpoint, run the script completely.

  3. Close the Smartpoint browser window.

Load Replay File

  1. In the ScriptPro Editor, open the ASL script develop file which was recorded.

  2. From the Replay menu, select Load Replay File. A browser window displays where the Replay files are saved by default.

  3. Select the .spr file that contains the same name as the ASL file.

  4. The Replay Results window displays.

    The first functioning line is highlighted in blue.

Setting Breakpoints

Breakpoints are used to step to a specific line of code without stepping through each line of the code.

  1. Find the line you would like to watch and place the cursor on that line.

  2. Press F9, or select the Replay menu item then select Toggle Breakpoint. Turn the breakpoint off by pressing F9 or by selecting the Replay menu then Toggle Breakpoint.

  3. The line is highlighted.

  4. The breakpoints are also listed in the Replay Results window. The filename followed by the line number is listed.
    Note: If you have multiple breakpoints a scroll bar will appear.

Stepping through the code

Based on the recorded Replay file, you can step through each line of code or skip straight to a breakpoint.

  1. Load the Replay file and your first line of code will be highlighted in blue.

  2. Press F10 or select Step Next from the Replay menu to move from line to line through the code.

  3. After each line that contains a variable that changes value, the Autos window will update with the variable name and value.

    Note: Only variables with new values will show. Only 5 variables will be seen at one time.

Watching a variable

As you step through, specific variable values can be watched.

  1. Type the variable in the left column that you wish to watch in the Watch window in the Replay Results window.

  2. Step through the code as normal using F10 or F5 through breakpoints. The values will display automatically after passing the line of code where the value changed.

    Note: Only 5 variables can be watched. To no longer watch a variable, highlight and delete the variable name.