vscode-powershell
vscode-powershell copied to clipboard
The menu 'Go to Definition' does not support 'Module-Qualified Cmdlet Names' syntax
Prerequisites
- [X] I have written a descriptive issue title.
- [X] I have searched all issues to ensure it has not already been reported.
- [X] I have read the troubleshooting guide.
- [X] I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- [X] I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
Summary
Once added a module name to a function name, 'the menu' considers this syntax as a full function name.
see: https://github.com/PowerShell/vscode-powershell/issues/928
PowerShell Version
Name Value
---- -----
PSVersion 5.1.19041.1320
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.1320}
BuildVersion 10.0.19041.1320
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Visual Studio Code Version
1.64.2
f80445acd5a3dadef24aa209168452a3d97cc326
x64
Extension Version
[email protected]
[email protected]
[email protected]
Steps to Reproduce
Use the 'Module-Qualified Cmdlet Names' syntax into a script.
Visuals
Before
inside the module
inside a script
After
inside a script
inside the module
Logs
No response
Thanks @LaurentDardenne for opening this issue and for providing the repro steps! We dont have scheduled time for this fix at the moment but I will mark it as up for grabs
This is mostly fixed. That is, the problem where the command name's when qualified with a module name treated the whole string as the command name has been fixed by stripping the module name when building the reference tables. However, we still have a separate "problem" where we can't jump to definition (or find references) in modules that are only imported via the import statement in a piece of code; the actual definition/references must be in script files within the workspace.
This issue has been marked as fixed. It has been automatically closed for housekeeping purposes.