Is there an easy way to run a Python file inside Visual Studio Code with arguments?
I know I can add a custom configuration in the launch.json
file with the
Maybe this will do what you want: create a python.bat file in your %PATH% that points to python.exe:
C:\Users\joecoder\AppData\Local\Programs\Python\Python37\python.exe %*
Then use a Visual Studio Code terminal window (you can open a new one from the Terminal tab at the top of Visual Studio Code) to change directory to where your .py file resides, and run as normal:
PS C:\Users\joecoder> cd vscode\python
PS C:\Users\joecoder\vscode\python> python test.py 1 2 3
Of course this runs outside of Visual Studio Code, so be sure to write out changes after edits and you'll have to use print() style debugging.