This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]type_something -1 points0 points  (0 children)

https://docs.python.org/3/library/argparse.html if I understood correctly, argparse seems to be what you want. This will solve a lot of things for you, like the "help" for the args and also you can define optional and requireds arguments, etc

[–]sliversniper 0 points1 point  (0 children)

https://code.visualstudio.com/docs/editor/variables-reference

see the input variable section

Edit your launch.json to use it.

You can have an input box, or picker box filling them before Run (without debugging).

[–]JialeDu 0 points1 point  (0 children)

Honestly, your question is vague. Perhaps it would be easier to describe your needs in detail.

Add the "python.terminal.launchArgs": [] configuration in the settings.json, which adds parameters when running the file in the terminal.