What you don't want is a problem that goes away when you debug it. It is expected that a program have additional debugging code inside #iff DEBUG blocks. After all, that's why it's a debug build. But what you definitely don't want to do is have that debugging to fundamentally change the program's behavior. You can perform additional validation. You can raise assertion failures. You can track resources. It can be slower and consume additional resources, but you had better not alter code flow.