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.
#if defined DEBUG then /*debugging code*/ #else /* other action*/ #end if
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.