Running a Python program with arguments from within the Visual Studio Code
<p>I am running a Python program that takes some command line arguments. How can I provide these arguments when I am building a program within the Visual Studio Code?</p>

<p>You can pass in the arguments into the program by defining the arguments in the <code>args</code> setting of launch.json as defined below:</p>

<p><code>json
{
    "name": "Python",
    "type": "python",
    "pythonPath":"${config.python.pythonPath}", 
    "request": "launch",
    "stopOnEntry": true,
    "console": "none",
    "program": "${file}",
    "cwd": "${workspaceRoot}",
    "args":["arg1", "arg2"],
    "env": {"name":"value"}
}
</code></p>

<p>Further information can be found on the documentation site here: <a href="https://github.com/DonJayamanne/pythonVSCode/wiki/Debugging#args" rel="nofollow">https://github.com/DonJayamanne/pythonVSCode/wiki/Debugging#args</a></p>

python build vscode