Restore "with args" to the launch.json options for PowerShell
See original GitHub issuePrerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
Sometime after ec53532bcf856725e1c763068122131aa949eb50, PowerShell Launch Current File w/Args Prompt
was removed from launch.json
.
That useful way of specifying args to a script being tested hasn’t been replaced or updated since. Running the script and getting a prompt for Mandatory = $true
parms just isn’t the same. And who wants to specify args in launch.json
itself?
It’s a pain to keep coming back to the repo to find the syntax for w/Args Prompt
because I have too much else to remember.
Can we please put this back into launch.json
?
I miss it.
Proposed Design
Put back a few lines of JSON code into launch.json
that were summarily removed for some reason that’s probably lost to history.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Debugging PowerShell script in Visual Studio Code – Part 2
You can debug those PowerShell scripts from the C# project by adding a PowerShell launch configuration to the C# project's launch.json file. The ......
Read more >Debug powershell in Visual studio code with parameters from ...
Then just open the "Run and Debug" sidebar pane on VSCode (the play button with the bug or Ctrl + Shift + D...
Read more >vscode\launch.json - PowerShell Gallery
.vscode/launch.json ... "name": "PowerShell Launch Debug.ps1", ... "name": "PowerShell Launch Current File w/Args Prompt", "script": "${file}", "args": [
Read more >C/C++ extension FAQ - Visual Studio Code
json file and remove it. How do I recreate the IntelliSense database? Starting in version 0.12.3 of the extension, there is a command...
Read more >How to use PowerShell with Visual Studio Code like a Pro
Launch Visual Studio Code and press Ctrl+P (Cmd+P on Mac). The editor opens a side bar Extensions with the PowerShell extension selected. Click ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Back in the day, I implemented this feature #707. The
configurationSnippet
in question is:Originally we put this in the
configurationSnippets
&initialConfigurations
fields underdebuggers
in thepackage.json
. But the VSCode team complained that the PowerShell extension offered too many debug configurations by default - see #1611. So they asked us to whittle down the defaults inpackage.json
and provide additional debug configuration via theprovideDebugConfigurations
provider, which I did in #2084.When we determined what would be in the dynamic debug config list we decided to whittle the list down a bit realizing that all
w/args Prompt
required was the user modifying the “args” property like so:It’s even in the tooltip for args:
That said, I have no objections to adding this launch config back in.
This issue has been marked as answered and has not had any activity in a day. It has been automatically closed for housekeeping purposes.