Skip to content

Intellisense not working with local functions, no synopsis or function details shown. #2907

@xantari

Description

@xantari

Issue Description

When writing powershell scripts intellisense seems to not be working. Given the following example powershell script:


# On this line, remove this comment and type: Start-A10-Session and hit Ctrl+Space and you will see it doesn't give any details about the Start-A10-Session function

function Start-A10-Session {
    Param
    ( 
        [String]
        # A10 DNS Name
        $A10Device,
        [String]
        # User Name
        $Username,
        [String]
        # Password        
        $Password
    )

    $body = '{"credentials":[{"username":"' + $UserName + '", "password":"' + $Password + '" }]}'
   
    Write-Host $body
    
    $response = Invoke-RestMethod -Uri "https://$A10Device/axapi/v3/auth" -Method 'Post' -Body $body -ContentType 'application/json'
    
    Write-Host "Opened SessionID =  $response.authresponse.signature"
    return $response.authresponse.signature

        <#
        .SYNOPSIS
        This is a test powershell script
...
    #>
}

When you start to type Start-A10-Session all you see is this:

image

No parameters are listed, and the synopsis information is missing.

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.19041
VSCode 1.48.1
PowerShell Extension Version 2020.6.0

PowerShell Information

Name Value
PSVersion 5.1.19041.1
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.19041.1
BuildVersion 10.0.19041.1
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
angular-console nrwl 13.0.0
angular-essentials johnpapa 9.0.1
Angular2 johnpapa 9.1.2
auto-rename-tag formulahendry 0.1.4
color-manager royaction 0.5.7
csharp ms-dotnettools 1.23.1
debugger-for-chrome msjsdiag 4.12.10
debugger-for-edge msjsdiag 1.0.15
docomment k--kato 0.1.18
EditorConfig EditorConfig 0.15.1
markdown-all-in-one yzhang 3.2.0
material-icon-theme PKief 4.2.0
ng-template Angular 0.1000.7
powershell ms-vscode 2020.6.0
prettier-vscode esbenp 5.1.3
prettify-json mohsen1 0.0.3
rainbow-csv mechatroner 1.7.1
remote-wsl ms-vscode-remote 0.44.4
vscode-eslint dbaeumer 2.1.8
vscode-npm-script eg2 0.3.13
vscode-peacock johnpapa 3.8.0
vscode-typescript-tslint-plugin ms-vscode 1.2.3
vscodeintellicode VisualStudioExptTeam 1.2.10
winteriscoming johnpapa 1.4.3
xml DotJoshJohnson 2.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions