Delphi: it is Release configuration but Delphi still thinks it is Debug


I have a project in Delphi 2010. It is built in Release but Delphi "thinks" that it is still Debug.

Have a look at these pictures:

What can I do?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you can change the compiler directive to {$IFDEF RELEASE} but if you keep it as it is, it would be a good practice in case a bug occurs in the program.
starhuAuthor Commented:
If I use {$IFDEF RELEASE}, it won't go in it either.

Delphi still thinks it is in Debug mode.
Do you have a a define like below in the code?
Probably at the top or in the first code module that gets compiled


The $IFDEF is using conditional compilation (not debug mode)
It tests if the DEBUG constant is defined.  If it is then it does the TRUE part if the if

MerijnBSr. Software EngineerCommented:
Also check if for some reason the DEBUG conditional define somehow ended up in your release configuration (it's on the compiler options page, you should see DEBUG in the debug configuration, but not in the release configuration).

If that is all ok (and you checked for {$DEFINE DEBUG} like mentioned before): did you did a _full_ recompile?
You can also try to delete the .dcu files for the units which misbehave, and compile again.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MerijnBSr. Software EngineerCommented:
For future reference, can you explain how you solved your problem?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.