How can I use "#ifdef DEBUG"?

Hi,

I would like to use #ifdef DEBUG in my code. I know that it supports #ifdef now based on a post I found but I can’t figure out how to set DEBUG in a build. I want this set for development builds as well, not just the builds flagged as “Debug” in the config.

Any ideas?

In engine source code you can find

#ifdef UE_BUILD_DEBUG

And there equivalents of other solution configurations, but i’m not sure if it works with projects

1 Like

Ok so i convert my comment to anwser :slight_smile:

that works! and it works in development builds too :slight_smile: thanks for the help

For more details see also:
https://forums.unrealengine.com/archive/index.php/t-28515.html