I use the PyCharm IDE for Python programming. Is there a possibility to check, whether I'm in debugging mode or not when I run my program? 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 _debug_ which is set by myself, but I look for a better solution. Continue reading...