#DEBUG CODE metastatement  

Purpose

Compiler directive to suppress generation of debugging code.

Syntax

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

Remarks

When a program is compiled for debugging in the PowerBASIC IDE, the compiler must generate some additional code to facilitate setting of breakpoints and some other debug operations.  In most cases, this does  not affect the execution of your program.  However, in the case of code repetition in a tight loop, or for certain assembler code or data which must not be altered, it may be very important that some debugging code be suppressed so that code will execute correctly, and at full speed.

#DEBUG CODE OFF suppresses generation of debug code, from that line, until a subsequent #DEBUG CODE ON (or the end of the Sub/Function/Method/Property) is reached.  Of course, when debug code is suppressed, it is not possible to set breakpoints on those lines.

 #DEBUG CODE metastatements are ignored if not compiling for debug.

See also

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