It was my understanding that to add a command line option (in my case I want the -i option) to the python execution in VScode, I was to alter the variable "python.terminal.launchArgs"
As this is curiously not working, I am going to describe the steps I took, so that perhaps some more knowledgeable person can spot my mistake.
I went to file > preferences > settings
then I searched for python
The first mention I found to settings.json was in Python > Analysis:Disabled. I clicked "Edit in settings.json", hoping to open the config file
I set the config file as follows:
{ "window.zoomLevel": 3, "python.pythonPath": "/usr/bin/python3", "python.terminal.launchArgs": ["-i"] }I went back to my code and pressed F5 to run it. It ran on the terminal that comes with vscode. The command line was as follows
lucas@mongolia:~/aulas_ed$ cd /home/lucas/aulas_ed ; env "PYTHONIOENCODING=UTF-8" "PYTHONUNBUFFERED=1" /usr/bin/python3 /home/lucas/.vscode/extensions/ms-python.python-2018.12.1/pythonFiles/ptvsd_launcher.py --default --client --host localhost --port 34661 /home/lucas/aulas_ed/teste.pyAs you can see, that did not include
"-i".I tried altering other variables in
settings.json, in the same window. The text size works (text size changes immediately) and the python path variable works (if I type a nonsensical path, F5 stops working and VScode starts complaing about an undefined path -- just to say that the settings file seems to work properly for other ends.
python.terminal.launchArgs: "Note that Visual Studio code ignores this setting when debugging because it instead uses arguments from your selected debugging configuration inlaunch.json."-soption (whether debug or not) topythonelse it goes wrong on start-up, but like you cannot find how to do that. Which means I am completely stumped. Any further ideas, or how did you work around?