There’s a couple of different ways to debug Python, depending on what you’re using for development.
One is putting in print statements to check values and then running from a text editor like Geany (which has an Execute button) or in the command line. It looks like you’re trying the command line but having issues. Maybe try taking out the flags. I’ve never tried running a Python script from the command line with anything but “python myscript.py”. Maybe you have some good reason for the flags being there. Honestly, I know squat about them.
The second is stepping your Python code. This is my preferred method. You can do this with VS Code. If you’re at all familiar with Visual Studio, it’s awesome.