-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Task Runner: Provide input parameters #4758
Comments
This is not supported right now. What would be cool is if you select the task in the quick box if you could provide params there. But this filters right now. |
Any progress on this? |
No. Nothing has happend here so far. |
Any chance this will end up in VSCode anytime in the near future? :) |
We want to have a task to switch branches across all of our microservices dynamically based on a text string to allow our QA teams to switch to a develop snapshot. Being able to prompt for that string would be of great use to us. |
Also, it will be great if we could define, in tasks.json, a list of optional variables something like:
Thanks! |
+1 |
+1 Being able to manage low-to-medium complexity workflow operations directly from VSCode would be great. |
Certainly would be very beneficial to have this ability! |
Launch configurations support to embed variables that can be used to ask for input through the UI. It is not difficult to support the same for tasks (because they share most of the variable implementation anyway). |
This is of great interest to me. I work on a CLI project (Angular CLI) and would love to re-use a common debug launch configuration with different arguments. @weinand I took a look at #30588 and the extension you linked to didn't work for me. I've also tried to prompt for values using the |
Sorry, I'm not the author of the linked extension and I did not read the description thoroughly. The documentation is outdated: VS Code has changed the syntax for command variables from an ambiguous '.' to a more readable ':' How did you try to prompt for values using the preLaunchTask? |
I got it to prompt me, but the entry of the values was confusing and I couldn't get the value I wanted into the launch config. Admittedly I didn't have a whole lot fo time to play with it and reverted back to my previous workflow for now. |
Sorry, but the extension was meant to be an example showing that you can easily support user input for specific work flows. Just let me know what you need, and I can sketch something up. |
It would be good to be able set an input when calling the task. The task caller can prompt for user input after selecting the task (having in task.json like: "argsPrompt": true) or having some predefined arguments to select before running. Or both :) |
+1 |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
I found a solution on Stackoverflow, which works at least for windows:
As you can see, it is also possible to prompt for multiple arguments. |
👆 the suspense is killing me.... |
Sorry for my incomplete comment, I was probably on my phone... 😄 |
+1 |
This would be a real good feature for some of the debugging scenarios using vscode we are looking at. Specifically to debug inside docker containers. |
@alexr00 Thank you for solving this issue. Is there any documentation on how to use this new feature? |
I'll be writing documentation for it this week to link to in the release notes. |
Thank you for your effort and the fast response :) |
I worked with the new feature on the Insiders build and it looks great, this is really helpful for my workflow, thanks. Forgive me if I'm being greedy but it would be great to have input "type" option that would let me skip the prompt and use only the "default" value, this way I would not being nagged by the prompt in cases I want this value to be constant. |
I would like to provide input parameters when a task is executed. How can I accomplish this?
The documentation mentions "variable substitution," which is useful, but a browser search for "param" yields nothing.
Cheers,
Trevor Sullivan
Microsoft MVP: PowerShell
The text was updated successfully, but these errors were encountered: