Skip to content

Variable peek doesn't work if variable defined in another file. #710

Closed
@bobfrankly

Description

@bobfrankly

System Details

  • OS: Windows 10
  • VS Code version: 1.11.2
  • PowerShell extension version: 0.12.2
  • Output from $PSVersionTable:
    PSVersion 5.0.10240.16384
    WSManStackVersion 3.0
    SerializationVersion 1.1.0.1
    CLRVersion 4.0.30319.42000
    BuildVersion 10.0.10240.16384
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    PSRemotingProtocolVersion 2.3
Copy / paste the below commands into the PowerShell Integrated Terminal, and paste the output here

code -v       1.11.2
6eaebe3b9c70406d67c97779468c324a7a95db0e

$pseditor.EditorServicesVersion   - 0      12     1      0

code --list-extensions --show-versions
dbaeumer.vscode-eslint@1.2.8
ms-mssql.mssql@0.3.0
ms-vscode.csharp@1.9.0
ms-vscode.PowerShell@0.12.2
schneiderpat.aspnet-helper@0.6.3

$PSVersionTable
PSVersion                      5.0.10240.16384
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.42000
BuildVersion                   10.0.10240.16384
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3

Issue Description

I setup an example here: https://github.com/bobfrankly/Derp

Peeking a variable definition doesn't appear to behave the same as peeking function definitions, when the variable is defined in a separate file. In the example, opening 'derp.ps1' and peeking the testFunction takes you to the definition in the /Resources/filePaths.ps1. However, peeking the $filePaths variable in derp.ps1, does not find the definition in the /Resources/filePaths.ps1 file, it just finds the first usage of the variable within the same file.

Is this expected behavior?

EDITS: To clarify issue description.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions