question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

consider to allow for variable substitution in the inputs section

See original GitHub issue

testing #64214:

I assume that variable substitution in the “inputs” section is disabled to avoid recursion…

However, I think it would be helpful to allow “simple” non-interactive variables like ${env:…}, ${config:…}, ${workspaceFolder:…}. This makes it possible to do something like this:

{
			"label": "echoPrompt",
			"description": "Please enter a folder name",
			"default": "${env:HOME}",
			"type": "prompt",
}

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:36
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
alexvy86commented, Feb 7, 2019

My use case would be to use the path to the current file as the default value for one of my inputs.

"inputs": [
  {
    "id": "which-file",
    "description": "Enter the path to a .py file",
    "default": "${file}",
    "type": "promptString",
  }
]
1reaction
codewritecommented, May 6, 2020

Are there any workarounds? i.e. any way to have a variable input default?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Predefined variable substitution in VSCode tasks user input
This issue suggests that variable substitution is currently not supported for inputs , but might be added sometime in the future: consider ...
Read more >
Where variables can be used - GitLab Documentation
As it's described in the CI/CD variables documentation, you can define many different variables. Some of them can be used for all GitLab...
Read more >
Variables reference - Visual Studio Code
Variables Reference. Visual Studio Code supports variable substitution in Debugging and Task configuration files as well as some select settings.
Read more >
Variable substitution in the C shell - IBM
The C shell maintains a set of variables, each of which has as its value a list ... notations allow you to introduce...
Read more >
6 Using Substitution Variables - Oracle Help Center
You can define a substitution variable of datatype NUMBER implicitly through the ACCEPT command. You will learn more about the ACCEPT command. To...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found