It is strange but I am not able to get it work. It looks like UE_BUILD_DEBUG is not used in any configuration. I use downloaded binary version and available build configurations are:
DebugGame
DebugGame Editor
Development
Development Editor
Shipping
I use DebugGame Editor for debugging and UE_BUILD_DEBUG is always 0.
I think this is similar issue: Are there #defines for conditional compilation based on the build configurations? - Programming & Scripting - Epic Developer Community Forums
EDIT: I think I found reason: How can I differentiate between Macros for DebugGame Editor vs Development Editor? - Debugging, Optimization, & Profiling - Epic Developer Community Forums. It looks like I will need to make custom macro for DebugGame Editor.