Skip to content

Debugging PowerShell with argument prompt causes error #1340

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

Closed
robrtitus opened this issue May 29, 2018 · 10 comments
Closed

Debugging PowerShell with argument prompt causes error #1340

robrtitus opened this issue May 29, 2018 · 10 comments

Comments

@robrtitus
Copy link

robrtitus commented May 29, 2018

Issue Description

I am experiencing a problem with script debugging. Using the launch configuration of "PowerShell launch current file w/ args prompt". After inputting parameters and arguments I receive an error message.

Steps to reproduce:
With the PowerShell extension already installed...

  1. Open a ps1 file in VSCode
  2. Ensure the default PowerShell launch configurations exist, primarily "launch current file w/ args prompt"
  3. Have the ps1 file active
  4. Press F5
  5. A prompt will appear for the script arguments (actual arguments, not an empty string)
  6. Enter the arguments in the prompt
  7. Press enter
  8. Error will appear saying no arguments were specified
    error

This issue does not occur when all extensions are disabled, but you're prompted to install the PowerShell extension. VSCode won't run the script without it.

Attached Logs

1527619157-f3d579d7-202b-45ea-9701-df03df50d3701527619151806.zip

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 6.1.7601
VSCode 1.24.0-insider
PowerShell Extension Version 1.7.0

PowerShell Information

Name Value
PSVersion 5.1.14409.1005
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.14409.1005
BuildVersion 10.0.14409.1005
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
azure-account ms-vscode 0.4.0
better-align wwm 1.1.6
gc-excelviewer GrapeCity 2.0.21
mssql ms-mssql 1.3.1
PowerShell ms-vscode 1.7.0
team ms-vsts 1.136.0
vscode-markdownlint DavidAnson 0.17.0
@rkeithhill
Copy link
Contributor

Duplicate of #1315. This has been fixed in daily builds if you want to try a daily build. Otherwise, the fix will be in the next update to the extension.

@renomac
Copy link

renomac commented Jun 7, 2018

I'm confused. This issue says that the user is on VSCode 1.24.0-insider, but the issue that you linked to says it was fixed ... in 1.24? I'm getting the same issue in version 1.24.0.

@rkeithhill
Copy link
Contributor

Well, it requires a combination of VSCode 1.24 and an update of the PowerShell extension beyond 1.7.0. That is, the bug is fixed on master but we haven't shipped an update yet. :-(

@renomac
Copy link

renomac commented Jun 7, 2018

Thank you for the clarification.

@123dev
Copy link

123dev commented Jun 18, 2018

Well, it requires a combination of VSCode 1.24 and an update of the PowerShell extension beyond 1.7.0. That is, the bug is fixed on master but we haven't shipped an update yet. :-(

Where does one get update of the PowerShell extension beyond 1.7.0 build and how do we install it?

Thanks

@TylerLeonhardt
Copy link
Member

Do to some internal processes, the next release is taking a bit longer to get out the door. If you want, you can grab a CI build in the meantime:
https://ci.appveyor.com/project/PowerShell/vscode-powershell/build/artifacts

Note, you'll want the PowerShell-insiders.vsix

@123dev
Copy link

123dev commented Jun 19, 2018

@tylerl0706 Thank you.
I had hard time replacing the existing plugin which claimed to be newer than the 609 build.
Uninstall would give me errors, "Cannot find extension" or something along those lines.
Manually uninstalled by deleting the folder from extensions.'
Then finally managed to install from vsix.

Thanks, can confirm it is working.
PS: I installed PowerShell-insiders.vsix instead of v2, not seeing any docs for the difference, just went with PowerShell-insiders.vsix.

@TylerLeonhardt
Copy link
Member

V2 is a preview of the V2 version of the extension that has PSReadLine support among other things. Here's some info on PSRL if you're interested :)
PowerShell/PowerShellEditorServices#672

@123dev
Copy link

123dev commented Jun 19, 2018

Thanks for v2 info.

I spoke too soon,
The official version, for whatever reasons is treated as a newer version, and it self updated itself, making it break again.

Argh... :(

@TylerLeonhardt
Copy link
Member

I need to reach out to the VSCode team to ask them how to do preview builds effectively.

I want people to be able to download a VSIX without this pain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants