Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow args to be defined from "user input" by using command.extention #77

Closed
DonJayamanne opened this issue Nov 13, 2017 · 6 comments · May be fixed by irinazheltisheva/vscode-python#3 or Aqeelkha/vscode-python#4
Labels
feature-request Request for new features or functionality

Comments

@DonJayamanne
Copy link

From @mike-pt on January 30, 2017 23:14

While discussing the ability to get user input to define program or args (see vscode#9544 ) I noticed I could do this with the python debugger for "args".

Since args expects an array not a strings this is at the moment impossible, however if args would be changed to string and (as suggested in the GHI) the Pyhton Debbuger impletments its own ${command.extension.python-debug.getCommandline} we could easy promt the "user" for args, this would be very handy when testing an appp for a bunch of different scenarios that change according to those args.

Please consider this as a FR

Copied from original issue: DonJayamanne/pythonVSCode#684

@DonJayamanne
Copy link
Author

Will work on this soon.

@DonJayamanne
Copy link
Author

From @mike-pt on March 5, 2017 13:37

Awesome, btw in the meantime I noticed that vscode fails to parse the args if I use "--".

I.E. we have a project where we use getopt and when I pass some arg with "--something" getops fails as if I've entered something unavailable, yet it works just fine in the console (outside vs code/debugger).

I'm just adding args as:

args : [
"-a true",
"--se section"
]

@DonJayamanne
Copy link
Author

Try the following:

args : [
"-a",  "true",
"--se", "section"
]

@DonJayamanne
Copy link
Author

From @mike-pt on March 5, 2017 14:15

ah I see now I was doing it wrong, in fact that would break things specially for booleans as it would add a space (" true"), I did not notice before cause I was using "-atrue" there and that was was also working.

Thanks for the clarification, can't wait for the FR though as that simplifies things when I want to test different "arg cases" one after the other, ofc for now I can still just change args, or add a new configuration to launch.json

@DonJayamanne
Copy link
Author

From @mike-pt on June 5, 2017 18:48

Any idea if this is still going to land soon?

@brettcannon brettcannon changed the title FR: Allow args to be defined from "user input" by using command.extention Allow args to be defined from "user input" by using command.extention Nov 14, 2017
@brettcannon brettcannon added awaiting 1-decision feature-request Request for new features or functionality labels Nov 14, 2017
@brettcannon
Copy link
Member

We are planning to solve this by helping users to attach to a running Python process, so you can start Python how you want and then post-launch attach to it (#1182 ).

@lock lock bot locked as resolved and limited conversation to collaborators Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
2 participants