Checking for compiler pragmas when building Debug

So it’s been at least a decade since I needed to care about compiler pragmas, can some gentle soul remind me how to tell if the project is set to compile in debug mode or not?
I seem to remember using ‘#pragma debug’ in the PRJ but I can’t remember how to check in code whether it’s set or not.
And, not that this should matter, this is C6 :slight_smile:

The Project Manager sets the define(_DEBUG_) pragma to “on” and the define(_RELEASE) pragma to “off” if the project has to be compiled in debug mode. These 2 symbols can be used in sources, for example,

… text to be used in debug mode only …
! —

Single lines which can be used in debug mode only can be marked by ? character in first column:

? MESSAGE (‘I run in debug mode’)

1 Like

Perfect, thank you Alexey!

There is the Predefined Compiler Flags help topic. It does not mention _RELEASE_

Help on OMIT and COMPILE show examples

The C8-C11 Editor has a Comment button on the Toolbar. The Drop list of that can wrap the Selected code in an OMIT or COMPILE, or can prefix the lines with “?” for Debug:


Omit/Compile popup window asks for a Symbol. I typed _Debug_. Be nice if it had a drop list of common choices.