PowerShell / PowerShell/vscode-powershell

When debugging, remember script arguments on a per-script, not per-workspace/folder basis

Open
#2,847 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Debugging Issue-Enhancement Up for Grabs
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

Summary of the new feature

When one debugs a PowerShell script with the "PowerShell Launch Current File w/Args Prompt" configuration:

        {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell Launch Current File w/Args Prompt",
            "script": "${file}",
            "args": [
                "${command:SpecifyScriptArgs}"
            ],
            "cwd": "${file}"
        },

the input field is pre-filled with the most recent arguments input on the previous debug session, whatever script from the current workspace/folder was being debugged at that time.

It would be useful to have the pre-filling done with the most recent arguments for the currently debugged script.

IOW, the arguments should be remembered separately for each script in the workspace/folder.

This would make debugging several scripts in the same workspace/folder easier.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the PowerShell Launch Current File w/Args Prompt configuration and the SpecifyScriptArgs input described in the issue. Trace where the most recent arguments are stored and make the remembered value depend on the currently debugged script rather than the workspace or folder. Done means each script in a workspace pre-fills its own most recently entered arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript, vscode
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
54/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.