Search code examples
pythondebuggingconfigurationpycharmbreakpoints

Pycharm debugger is connected but doesn't stop at breakpoints


As you can see, my debugger on pycharm is connected, but the code still run without stop at the breakpoints. What could be the problem please ?

Here is a screenshot after when I play debug mode on the test.py file:

pycharm debug problem

As you can see, it doesn't stop at the breakpoint. Can someone help me please ?


Solution

  • Try to fix indent of comparison with __main__:

    def main():
        ...
    
    
    if __name__ == "__main__":
        main()