I had the same random problem.
I was able to just fix it by:
- Uncheck the
Project Properties -> Build -> Define DEBUG constant
- Click Save
- Check
'Define DEBUG constant'
option again
- Click Save
- Rebuild the Project
- Run
After doing this it hit the #if DEBUG
line as expected.