Skip to content

Choosing 'Go to definition' do not jump to parameter definition #668

Closed
@johlju

Description

@johlju

System Details

  • Operating system name and version:
  • VS Code version:
  • PowerShell extension version:
  • Output from $PSVersionTable:
PS> code -v
1.11.1
d9484d12b38879b7f4cdd1150efeb2fd2c1fbf39

PS> $pseditor.EditorServicesVersion
Major  Minor  Build  Revision
-----  -----  -----  --------
0      12     1      0

PS> code --list-extensions --show-versions
DavidAnson.vscode-markdownlint@0.7.1
donjayamanne.githistory@0.2.0
IBM.output-colorizer@0.1.0
ms-vscode.csharp@1.8.1
ms-vscode.PowerShell@0.12.2
PeterJausovec.vscode-docker@0.0.13
robertohuertasm.vscode-icons@7.5.1
ryu1kn.annotator@0.10.1
seanmcbreen.Spell@0.9.1

PS> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.15063.0
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15063.0
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

I don't know if this is by design. But when standing on $AdminCredential (line 12) and choosing 'Go to Definition' I was expecting it to go to line 9, but it goes to line 1.

Mock example:

$AdminCredential = 'MyAccount'

function Get-Something
{
    param
    (
        [Parameter()]
        [PsCredential]
        $AdminCredential
     )

     Write-Verbose -Message ('Credential: {0}' -f $AdminCredential.UserName)
}

Attached Logs

Don't think you need them in this case, but let me know I can provide them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions