#DEBUG DISPLAY metastatement  

Purpose

Display a message when an untrapped run-time error occurs.

Syntax

#DEBUG DISPLAY [ON|+ | OFF|-]

Remarks

#DEBUG DISPLAY ON enables error display mode within a compiled PowerBASIC program.  In this mode, whenever an untrapped error occurs (without the benefit of ON ERROR GOTO, TRY/CATCH, etc.), program execution is suspended, and a descriptive message is displayed.  This message includes the error number, a brief description of the error, and a position descriptor word to help you find the location of the error.  The position descriptor word is the first 8 characters of the name of the last (most recent) label, line number, or procedure that was executed. This mode should only be used during program development and debugging.  It should never be used in a production program.

When the descriptive message is displayed, it is accompanied by two buttons marked "OK" and "Cancel".  If "OK" is selected, program execution continues despite the error condition.  If "Cancel" is  selected, program execution is stopped.  However, if any child processes were started, it is possible they will continue running until ended normally.

#DEBUG DISPLAY OFF suppresses display mode, and is the default condition.

See also

Error Trapping, Errors, Debugging, #DEBUG CODE, #DEBUG ERROR, #DEBUG PRINT