You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file suggestion works perfect, see screenshot: ( 1 ) and ( 2 )
Conclusion
I'm not sure if this is related to PowerShell-Plugin or to VSCode itself at all.
If this is a general VSCode issue or "by design" I'm thankfull for the answer and I'll forward it to another place. 👍 :-)
For me it would be better that the "File suggestion" goes from the "file itself" to find other elements.
OR better it should:
Check the file position
Check in which "project folder" the file is
Make suggestion list based on project folder you are in / file position
Another problem I faced is that sometimes functions like: $xmlDoc.Save($fullPath)
Are not working with "relative" pathes...
Inside of VSCode it saves on different location than execute the file in windows explorer directly with powershell. Strange behaviour.
But that's another topic itself. :-P
EDIT:
I figured out that when I have multiple folders added to a workspace like mentioned in this question:
I can't CTRL+Click a powershell function to jump into the other powershell file where the code is
When I open a workspace with only one folder added then:
I can CTRL+Click a function to jump into the other powershell file
The text was updated successfully, but these errors were encountered:
@homezonebenny thanks for opening this issue, this is related to a larger issue which is our limited support for multiple workspaces, currently we are tracking this ask with the following issue #2153 so I will mark this as a duplicate. Thanks!
Hello,
first here's a screenshot of what happens:
Imgur VSCode Screenshot
File structure
.\workspace\
.\workspace\Test.code-workspace
.\workspace\Guides\
.\workspace\Tests\
.\workspace\PowerShell-Tests\
.\workspace\PowerShell-Tests\Hash\Write-Hash-List.ps1
.\workspace\Default-Application\
Explanation
If you open a VSCode
Test.code-workspace
file like this:And you are inside of this file:
.\Workspace\PowerShell-Tests\Hash\Write-Hash-List.ps1
See screenshot point ( 3 ) and ( 4 )
You do not get the right file suggestion in the list (CTRL+Space).
See screenshot ( 4 )!
It seems that you only get the first "Project Folder" suggestions, instead of the suggestions around the file you are in.
In my case:
.\workspace\PowerShell-Tests\Hash\Write-Hash-List.ps1
The blue marked boxes are the other added "project folders" inside of this:
.\workspace\Test.code-workspace
But if you are using this a single project only like this:
.\workspace\Test-2.code-workspace
The file suggestion works perfect, see screenshot:
( 1 ) and ( 2 )
Conclusion
I'm not sure if this is related to PowerShell-Plugin or to VSCode itself at all.
If this is a general VSCode issue or "by design" I'm thankfull for the answer and I'll forward it to another place. 👍 :-)
For me it would be better that the "File suggestion" goes from the "file itself" to find other elements.
OR better it should:
Another problem I faced is that sometimes functions like:
$xmlDoc.Save($fullPath)
Are not working with "relative" pathes...
Inside of VSCode it saves on different location than execute the file in windows explorer directly with powershell. Strange behaviour.
But that's another topic itself. :-P
EDIT:
I figured out that when I have multiple folders added to a workspace like mentioned in this question:
When I open a workspace with only one folder added then:
The text was updated successfully, but these errors were encountered: