DEBUG Preprocessor Symbol
Enable the DEBUG preprocessor symbol if you want to add
code to your application to help you debug while testing the application.
This is a selection on the General tab of the Project painter. Although you do not typically enable the DEBUG symbol in a release
build, if a problem is reported in a production application, you
can redeploy the release build with the DEBUG symbol enabled to
help determine the nature or location of the problem.
a code block with the following format is parsed by the pb2cs code
emitter:
1 2 3 4 5 |
#if defined DEBUG then /*debugging code*/ #else /* other action*/ #end if |
When you use the DEBUG symbol, you can add breakpoints in
the DEBUG block only for lines of code that are not in an ELSE clause
that removes the DEBUG condition. If you attempt to add a breakpoint
in the ELSE clause, the debugger automatically switches the breakpoint
to the last line of the clause defining the DEBUG condition.
In the previous pseudocode example, if you add a breakpoint
to the comment line �/* other
action*/�, the breakpoint
automatically switches to the �/*debugging
code*/� comment line.
This figure shows
the context menu item that you can use to paste the #If
Defined DEBUG Then template statement in the Script view:
For information about using preprocessor symbols such as DEBUG, see Conditional Compilation.