I’m new to Python 3.14. I’m used to using Python 3.11.9.
Python 3.14 is on Windows 2025 Datacenter v24H2. Windows 2025 is also new to me. The .venv is activated.
I’m using Windows Terminal to do run the got.bat file.
I’m running a program using a batch file called got.bat, in debug mode. This is the only line in the got.bat file: .venv\scripts\python -m pdb ptool.py -tablescsv. I would like to start the pdb debugger for the program pacetool.py.
Possible workaround: Add a double hyphen after the script name. This should terminate option parsing and pass the rest on to your script. Note that your script will then see the "--" argument in sys.argv, so it’ll need to ignore that.
Note that using a single hyphen with multiple letters is often interpreted as either a series of separate flags (eg ls -lat is equivalent to ls -l -a -t), or as a flag with a parameter (eg git commit -mHello is equivalent to --message Hello), and a number of tools and libraries will assume that one or other of these is true. The normal way to write a longer parameter name is with a double hyphen. So another workaround would be to change your script to accept --pacetablegscsv, which pdb won’t expect and will therefore pass on to your script, rather than interpreting -p as an option and acetablegscsv as its parameter.
This issue still seems like a bug to me (similar bug reports in a previous post) as when -m pdb is used, the command line processor should look at all parameters after test.py as going to the program test.py.
The only difference is the program above uses more than on option and no options begin with “-p”. So there still seems to be a special case where pdb doesn’t work right.
See above for the explanation of single-hyphen options. PDB recognizes four such options: -h, -c, -m, and -p. If your word starts with one of those, it will be interpreted accordingly.
What you have here is a conflict of interpretation. Yes, it’s only a conflict because of a bug, but to understand the behaviour, you have to understand the conflict that’s happening
I do recommend sticking to the common convention of using a double hyphen for word options, though. It’ll make a lot of things easier.