vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Vscode incorrectly handling Powershell Param parameter

Open joejank opened this issue 8 years ago • 3 comments

In the following example:

Param ( [String] $JJDummy='/Users/joejank/Documents/log/', # default [String] $OutDir='/Users/joejank/Documents/log/', # default [String] $FileSelect="prompt", #default [Switch] $DebugJJ ) In Vscode the above resolves to: $outdir=/Users/joejank/Documents/log/ $jjDummy=212

but works fine in powershell terminal. This seems to always to be a problem with the first parameter.

System Details

  • Operating system name and version:MACOS 10.13.2
  • VS Code version:1.18.1
  • PowerShell extension version:
  • Output from $PSVersionTable:

Name Value


PSVersion 6.0.0-rc PSEdition Core GitCommitId v6.0.0-rc OS Darwin 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 Platform Unix PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:
1.18.1
929bacba01ef658b873545e26034d1a8067445e9
PS /Users/joejank/Dropbox/PS> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      5      1      0


PS /Users/joejank/Dropbox/PS> code --list-extensions --show-versions
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
PS /Users/joejank/Dropbox/PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-rc
PSEdition                      Core
GitCommitId                    v6.0.0-rc
OS                             Darwin 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov  9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


code -v
$pseditor.EditorServicesVersion
code --list-extensions --show-versions
$PSVersionTable

Issue Description

I am experiencing a problem with...

Attached Logs

Follow the instructions in the README about capturing and sending logs.

joejank avatar Dec 12 '17 19:12 joejank

I can't repro this. Can you tell me how you are executing this script? Debugger (F5) - if so which debug config and how is it configured or via F8 (with script selected or not?) or by executing the script file from the PowerShell Integrated Terminal?

rkeithhill avatar Dec 12 '17 20:12 rkeithhill

Sorry please close - user error - I had an invalid launch.json file

On Dec 12, 2017, at 3:41 PM, Keith Hill [email protected]- mailforwards at cloudmails.net [email protected] wrote:

I can't repro this. Can you tell me how you are executing this script? Debugger (F5) - if so which debug config and how is it configured or via F8 (with script selected or not?) or by executing the script file from the PowerShell Integrated Terminal?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PowerShell/vscode-powershell/issues/1123#issuecomment-351187551, or mute the thread https://github.com/notifications/unsubscribe-auth/AKUPVXTr9OhSmkPUAY0ybgi7WVG_nF6wks5s_uT9gaJpZM4Q_fFz.

joejank avatar Dec 13 '17 00:12 joejank

No problem.

rkeithhill avatar Dec 13 '17 00:12 rkeithhill