|KiXtart 2001 Manual|
KiXtart provides a basic debug facility. In debug mode, a script can be executed statement by statement, the value of variables or macros can be displayed, and you can execute arbitrary script commands. To run a script in debug mode, specify ‘/d’ on the command line. Alternatively, you can enter and leave debug mode anywhere in a script using the
DEBUG ON and DEBUG OFF commands.
Note: debug mode can be completely disabled from within a script using SetOption( “DisableDebugging”, “On”).
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.
In debug mode, the following keys are available to control script execution:
|F5||Run (deactivates debug mode, runs rest of script to the end or until a DEBUG ON command is encountered).|
|F8, [Space], or [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).|
|[Esc], ‘Q’||Exit debugger and script immediately.|
Additionally, you can 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