How do I detect if I am in release or debug mode?

How can I detect in my code that I am in Release mode or Debug mode?