DEBUG Preprocessor Symbol – PB Docs 120


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.

When the DEBUG symbol is enabled, code that is enclosed in
a code block with the following format is parsed by the pb2cs code
emitter:

Note:

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:

DEBUG Preprocessor Symbol_1.gif

For information about using preprocessor symbols such as DEBUG, see Conditional Compilation.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x