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
I have searched all issues to ensure it has not already been reported.
Summary
It would a better experience in VSCode when a .ps1 file is selected, if there already is a compatible PowerShell terminal selected, it is used rather than launching an instance of "PowerShell Extension".
In the above screenshot, you can see "PowerShell Extension" was launched after I selected a .ps1 file, even though I already had a pwsh terminal open.
Proposed Design
I realize this would require some sort of connection to the selected terminal and I can see some users objecting to this behavior, but I think those would be edge cases that can be addressed with an option to turn off the behavior.
In addition to using the currently selected compatible PowerShell terminal for the execution of a .ps1, if the current terminal window is changed to another compatible PowerShell terminal window, then the next time the script is executed in the debugger, the selected terminal session is used. Yes, it's duplicating the memory of all the session variables between the two terminals, but there are advantages of keeping the state separately. For example, maybe the user wants to try a quick sidebar idea without interfering with the main terminal and all the values that are present there.
At one point I would even like to be able to start a long-running script in one terminal and continue debugging another script in another terminal. I regularly execute hundreds of PowerShell scripts, some of which take over 10 minutes to complete. If I need to run another script that I may need to monitor, I have no recourse. I cannot even launch another instance of VSCode and point to the same folder so I can run another script, since VSCode doesn't support opening the same folder from two instances.
The text was updated successfully, but these errors were encountered:
Prerequisites
Summary
It would a better experience in VSCode when a .ps1 file is selected, if there already is a compatible PowerShell terminal selected, it is used rather than launching an instance of "PowerShell Extension".
In the above screenshot, you can see "PowerShell Extension" was launched after I selected a .ps1 file, even though I already had a pwsh terminal open.
Proposed Design
I realize this would require some sort of connection to the selected terminal and I can see some users objecting to this behavior, but I think those would be edge cases that can be addressed with an option to turn off the behavior.
In addition to using the currently selected compatible PowerShell terminal for the execution of a .ps1, if the current terminal window is changed to another compatible PowerShell terminal window, then the next time the script is executed in the debugger, the selected terminal session is used. Yes, it's duplicating the memory of all the session variables between the two terminals, but there are advantages of keeping the state separately. For example, maybe the user wants to try a quick sidebar idea without interfering with the main terminal and all the values that are present there.
At one point I would even like to be able to start a long-running script in one terminal and continue debugging another script in another terminal. I regularly execute hundreds of PowerShell scripts, some of which take over 10 minutes to complete. If I need to run another script that I may need to monitor, I have no recourse. I cannot even launch another instance of VSCode and point to the same folder so I can run another script, since VSCode doesn't support opening the same folder from two instances.
The text was updated successfully, but these errors were encountered: