[Python] Check if program runs in Debug mode

Discussão em 'Python' iniciado por Stack, Fevereiro 15, 2025.

  1. Stack

    Stack Membro Participativo

    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...

Compartilhe esta Página