Check if program runs in Debug mode
<p>I use the PyCharm IDE for Python programming.</p>
<p>Is there a possibility to check, whether I'm in debugging mode or not when I run my program?</p>
<p>I use pyplot as plt and want a Figure only to be shown if I debug my program. Yes, I could have a global boolean <code>_debug_</code> which is set by myself, but I look for a better solution.</p>