Release or Debug?

Is there a way in code to know if it is running as Debug or Release?
DeviceInformation.DebugInterface() does not help. It returns the same result regardless of Debug/Release.

use conditional compilation?

Check Debugger.IsAttached which will be true if you are connected via debug cable.

Do you mean the debug/release build option, as I assumed, or whether the debug cable was attached as Dave assumed?

1 Like

This should explain it. If Debug do x otherwise do y.

Thank you, everyone, for the suggestions. Very helpful.