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
When using the codelens "Run Tests" or "Debug Tests", the integrated terminal working directly immediately changes to the folder where the test is located before running PesterStub.ps1. It should stay in the context that it was in and just run the pester stub.
It is very annoying to have to change back to the directory I was in every time I click "Run Test" or "Debug Test"
Demo (Note the path change before InvokePesterStub even starts):
I'm assuming the CWD on the debug adapter request is what is changing the directory, though I am not sure. Since we are sending full paths in the InvokePesterStub request, the CWD should either not be set (if that will signal to PSES to use the existing directory, not sure?), or set to the current directory of the integrated terminal.
Adjusting this code will not affect the Run Code (F8) and other sections, which I assume it was copied from.
Issue Description
When using the codelens "Run Tests" or "Debug Tests", the integrated terminal working directly immediately changes to the folder where the test is located before running PesterStub.ps1. It should stay in the context that it was in and just run the pester stub.
It is very annoying to have to change back to the directory I was in every time I click "Run Test" or "Debug Test"
Demo (Note the path change before InvokePesterStub even starts):
Relevant Log Line
Relevant (?) Code:
vscode-powershell/src/features/PesterTests.ts
Lines 93 to 97 in ed7de2f
Recommendation
I'm assuming the CWD on the debug adapter request is what is changing the directory, though I am not sure. Since we are sending full paths in the InvokePesterStub request, the CWD should either not be set (if that will signal to PSES to use the existing directory, not sure?), or set to the current directory of the integrated terminal.
Adjusting this code will not affect the Run Code (F8) and other sections, which I assume it was copied from.
Willing to PR if flagged as up-for-graps.
Attached Logs
EditorServices.zip
Follow the instructions in the README about
capturing and sending logs.
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
The text was updated successfully, but these errors were encountered: