DEBUG

Action

Activates or de-activates debug mode at runtime.

In debug mode, the top line of the screen is used to display the current line in the script starting at the current statement. Optionally, the second line of the screen is used to display the value of a specific variable or macro.

 

The following keys are available to control script execution in debug mode:

Key

Action/description

F5

Run (deactivates debug mode, runs rest of script to the end or until a DEBUG ON command is encountered).

F8, <Space>, <Enter>

Step into (run a single statement, follow thread into subroutines, UDF’s, and secondary scripts).

F10

Step over (run a single statement, executes, but skips over subroutines, UDF’s, and secondary scripts as far as the debugger is concerned).

‘\’ (Backslash)

Enables you to query the value of a variable, array element or macro simply by typing the name and pressing <Enter>. Similarly, you can execute an arbitrary piece of KiXtart code simply by typing it in and pressing <Enter>.

<Escape>, ‘Q’

Terminate script execution and exit KiXtart.

 

Syntax

DEBUG "ON" | "OFF"

 

Remarks

DEBUG ON is ignored if debug mode has been disabled using SetOption( "DisableDebugging", "On").