-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run selection with F8 causes executed code to be recalled / duplicated into the integrated console prompt #4041
Run selection with F8 causes executed code to be recalled / duplicated into the integrated console prompt #4041
Comments
Thanks @dbrennand - I am having the same issue on multiple systems. |
I think you're probably right about it being PowerShell/PowerShellEditorServices#1823. /cc @SeeminglyScience |
I'm having trouble reproducing this. Can you share more environment info? @SeeminglyScience sees it only after first causing an error in the PSIC, but neither of you mentioned this. I'm using PS 7.2.4 on macOS. |
Ok seems to be Windows-only? Repro'd (without throwing an error first) on PS 7.2.4 on Windows. |
To me it was on a Windows Sever 2019 and WS2022 - brand new session, just after upgrading - the F8 button started pasting the code "twice" as @dbrennand explained. Name Value
---- -----
PSVersion 7.2.4
PSEdition Core
GitCommitId 7.2.4
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0 And Name Value
---- -----
PSVersion 7.2.5
PSEdition Core
GitCommitId 7.2.5
OS Microsoft Windows 10.0.20348
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
It is also worth mentioning that I can repro it on Windows PowerShell 5.1 on the same boxes :-) |
Reproduced on a different Windows system than I initially submitted the issue on: Windows 10 21H1 (OS Build: 19043.1766) =====> PowerShell Integrated Console v2022.6.1 <=====
PS C:\Users\dab> $PSVersionTable
Name Value
---- -----
PSVersion 7.2.4
PSEdition Core
GitCommitId 7.2.4
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS C:\Users\dab>
PS C:\Users\dab> Write-Output -InputObject "Hi!"
Hi!
PS C:\Users\dab> Write-Output -InputObject "Hi!" I can also reproduce this on Linux with WSL on the same system as above: dab@DESKTOP:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)" =====> PowerShell Integrated Console v2022.6.1 <=====
PS /home/dab> $PSVersionTable
Name Value
---- -----
PSVersion 7.2.5
PSEdition Core
GitCommitId 7.2.5
OS Linux 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS /home/dab>
PS /home/dab> Write-Output -InputObject "Hi!"
Hi!
PS /home/dab> Write-Output -InputObject "Hi!" |
Fix in PR! |
That is so awesome :) thanks for such a quick turnaround :) |
Wow! Awesome! 🚀 Thanks for the quick turnaround! @andschwa @SeeminglyScience! |
Same issue, even running the latest PowerShell Preview v2022.6.2. If this is fixed, how do I get my hands on it? Very annoying right now. |
Same issue, noticed that when selecting text and hitting F8 the error occurs, when putting focus back on editor and running SAME lines with f8 it does not happen. When selecting other lines it happens again. |
Working on getting a preview out right now! I got stuck trying to get a new end-to-end test in yesterday, sorry! |
Thanks @andschwa for your efforts :) really appreciate it! For @tropez1971 and @pascalkrielen - for now I would suggest manually downgrading to v2022.5.1 which is what I did for now :-) I hope that helps :-) |
@tropez1971 @pascalkrielen @andschwa @cblackuk Just testing v2022.6.3-preview with the fix and I can no longer reproduce! 🚀 🙂 |
Yay, glad to hear it @dbrennand! We're looking to move that preview to stable today, give it a good thorough whack of testing! |
Super happy to confirm that v2022.6.3 is working fine now!!! Thanks a lot everyone :D Great effort! |
Yep, can no longer reproduce in |
Bless you - I have been trying to figure this out for several days. Its not show-stopping but just very annoying. At first it seemed related to the terminal settings in VS Code but nothing I changed or set back to default helped. Reinstalled a bunch of things and updated other modules. Finally tracked it down to the module and found this article/PR. I updated the module to v2022.6.3 and can verify the issue is gone!!! ed... too many 2s... |
Sorry about that! We did not mean to introduce that bug, it was clearly very annoying. Ok, not that we mean to introduce any bug 😅 |
Prerequisites
Summary
My
vscode-powershell
extension updated this morning to[email protected]
and I'm having an issue where the selection of code I'm running with F8 is executed but then is recalled immediately into the integrated console prompt.Example:
It's as if the console history is being immediately recalled into the console prompt without additional input.
Rolling back to
[email protected]
fixes the issue:The latest preview extension
[email protected]
exhibits the same behaviour asv2022.6.1
.Could this be caused by PowerShell/PowerShellEditorServices#1823?
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
[email protected]
installed, launch the PowerShell integrated console.Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: