title: #if (DEBUG) VS System.Diagnostics.Debugger.IsAttached
body: <p>What is different between using <code>#if (DEBUG)</code> and <code>System.Diagnostics.Debugger.IsAttached</code> in visual studio? Are there cases of the <code>DEBUG</code> flag being set, but no debugger attached, or cases when a debugger could be attached when the <code>DEBUG</code> flag is not set?</p>