DEBUG()
Syntax
DEBUG( On_Off_Switch as N )
Argument | Description |
On_Off_Switch |
|
Description
The DEBUG() function is used to turn on or off the Alpha Five Debugger. The Debugger is used to trace through an Xbasic script, to watch the flow of execution. You can use the Debugger to find run-time errors and logical errors in your scripts. For more information, see "Finding Errors in Scripts".
Use the On/Off Switch parameter to turn the Debugger on or off. To turn on and display the Debugger window, use debug(1). To close the Debugger window, use debug(0).
Supported By
Alpha Five Version 5 and Above
Limitations
Desktop applications only.
Example
When running this script, the Debugger will appear after the word "Start" is printed to the Trace window.
function process as C (param as N) select case param = 0 process = "Zero" case param = 1 process = "One" case param = 2 process = "Two" case else
process = "Error" end select end function dim result as C trace.writeln("Start") debug(1) x = 0 for x = 1 TO 10 y = mod(x,3) result = process(y) trace.writeln(result) next x trace.writeln("End") |
See Also