PowerShell / vscode-powershell

Provides PowerShell language and debugging support for Visual Studio Code
https://marketplace.visualstudio.com/items/ms-vscode.PowerShell
MIT License
1.69k stars 479 forks source link

Preview: Autopopulation of comment based help not working #2516

Closed WithHolm closed 4 years ago

WithHolm commented 4 years ago

System Details

System Details Output

### VSCode version: 1.42.0 ae08d5460b5a45169385ff3fd44208f431992451 x64

### VSCode extensions:
4ops.terraform@0.1.8
aaron-bond.better-comments@2.0.5
auriou.webbrowse@0.0.1
bewhite.dokd-vscode-preview@0.2.1
bierner.markdown-mermaid@1.4.2
bpruitt-goddard.mermaid-markdown-syntax-highlighting@1.0.2
CoenraadS.bracket-pair-colorizer-2@0.0.29
DavidAnson.vscode-markdownlint@0.34.0
eamodio.gitlens@10.2.1
ed-elliott.azure-arm-template-helper@0.0.17
ginfuru.ginfuru-vscode-jekyll-syntax@0.1.1
humao.rest-client@0.23.1
jchannon.csharpextensions@1.3.1
jebbs.markdown-extended@1.0.16
jmrog.vscode-nuget-package-manager@1.1.6
johnpapa.vscode-peacock@3.5.0
karigari.chat@0.31.0
KnisterPeter.vscode-github@0.30.3
kodetech.electron-debug@18.11.1
mauve.terraform@1.4.0
mindginative.terraform-snippets@2.1.0
ms-azure-devops.azure-pipelines@1.165.1
ms-azuretools.vscode-apimanagement@0.1.2
ms-azuretools.vscode-azureappservice@0.16.2
ms-azuretools.vscode-azurefunctions@0.20.2
ms-azuretools.vscode-azurestorage@0.8.0
ms-azuretools.vscode-azureterraform@0.3.0
ms-azuretools.vscode-cosmosdb@0.12.1
ms-azuretools.vscode-docker@0.10.0
ms-mssql.mssql@1.8.0
ms-vscode.azure-account@0.8.8
ms-vscode.azurecli@0.5.0
ms-vscode.csharp@1.21.12
ms-vscode.powershell@2020.1.0 <---- DISABLED
ms-vscode.powershell-preview@2020.2.0 <---- ENABLED
ms-vscode.vscode-node-azure-pack@0.0.10
ms-vsliveshare.vsliveshare@1.0.1653
ms-vsliveshare.vsliveshare-audio@0.1.80
ms-vsliveshare.vsliveshare-pack@0.3.4
msazurermtools.azurerm-vscode-tools@0.8.4
passionkind.prettier-vscode-with-tabs@1.1.0
redhat.vscode-yaml@0.7.2
run-at-scale.terraform-doc-snippets@0.4.0
samuelbran.nodr@1.2.0
sissel.shopify-liquid@2.3.0
VisualStudioExptTeam.vscodeintellicode@1.2.5
vsciot-vscode.azure-iot-toolkit@2.16.0
vscode-icons-team.vscode-icons@10.0.0

### PSES version: 2.0.0.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      6.2.4
PSEdition                      Core
GitCommitId                    6.2.4
OS                             Microsoft Windows 10.0.18362 
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

Expected Behaviour

In std version of powershell when you wrote ## above a function you would get a autopopulated comment based help with the relevant parameters.

Actual Behaviour

when you write ## the characters will just be "removed", in lack of a better term.

Attached Logs

Follow the instructions in the troubleshooting docs about capturing and sending logs.

rjmholt commented 4 years ago

@WithHolm can you attach or send through your logs? With those we might be able to work out why this isn't working for you. You can find instructions on how to do that in the Attached Logs section of your issue description

WithHolm commented 4 years ago

logs.zip

TylerLeonhardt commented 4 years ago

fix out for this ^

A workaround for you to use for now is to make sure the function you're running it on doesn't have any other linting problems. Then it will work.

bmcmcm commented 4 years ago

In case anyone else looks this up, I found that even without any linting problems, ## would not insert the snippet. What I did was save all, exit VSCode, relaunch it, and then ## worked just fine. I suspect there is an issue with how a new file is added; e.g. not putting an extension at the time of creation and renaming afterward was one path that led to me not being able to use ## on any ps1 file currently open in VSCode.