Revision history [back]
To debug a file named main.py with command line arguments "1 2" (without the quotes), open the file and then use Debug Current File from the Debug menu. In the pre-launch dialog box that appears, leave the the top option bar set to Use Project Settings and the Following Run Args, and enter the following in the text field: 1 2
This assumes that you run the script from the command line using python main.py 1 2. Things are more complicated if you use python -m main 1 2 from the command line -- leave a comments if you use python -m, and we'll explain that case.