We help IT Professionals succeed at work.

$DEFINEd symbol when debugging options are on?

cadenza
cadenza asked
on
I would like to conditionally compile certain code only if debugging options are on. Is there any $DEFINEd symbol that tells me the code is being compiled with debugging options on? Like the VERxxx $defines for the Delphi version?

Wim
Comment
Watch Question

Commented:
in Delphi 6, you have this possibility:

{$IFOPT D+}
  ShowMessage('Compiled with debug info');
{$ENDIF}

$IFOPT directive can be used with any other compiler directive.

Author

Commented:
exactly what I was looking for. It works in D5 too, I saw.

Thanks!

Wim

Commented:
Cool, I've never noticed it in D5!
Glad to help :-)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.