-
Notifications
You must be signed in to change notification settings - Fork 502
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
Using the newest preview inserts " in the commandline after debug run of selected line/s #3937
Using the newest preview inserts " in the commandline after debug run of selected line/s #3937
Comments
Actually short after opening this, I even tested it with different commands and it seems like an " is introduced at all runs. |
I have a fix for this, need a new release of PSReadLine. Working on it! |
The fix will be in the final release. We're getting a PSReadLine update out tomorrow. |
Great! Thank you for the support! |
You're very welcome! |
This should be resolved via PowerShell/PowerShellEditorServices#1758 |
This issue has been marked as fixed. It has been automatically closed for housekeeping purposes. |
@MrFly72 Can you confirm this is now fixed for you? |
I have not got any update so far? still 2022.4.1 ? |
Ok nevermind, download it "by hand" and will check |
That's strange, it's not usually so slow! I see 2022.4.2 on the marketplace website. |
Sorry, not yet fixed and very confusing. This happened to me, using the code from #3881 :
But it looks like "clear", backspace problem etc. only brings up errors, when you already got into the error path from 1+2+3 |
Oh and one "funny" sidenote. This all only happens on F5 now, not F8 anymore as my first tests show. very weird! |
Can you share what it is you're debugging? There is a known issue if you re-enter |
That |
Oh! Also are you using an extensions like VsVim, or/and to you have any custom key handlers or prompt? Sorry, asking a lot of questions, but while I could repro this previously, I can't any more with the latest fix. So we certainly addressed the first cause we found, and I'm trying to figure out what else could be going on in your particular case. |
Do you have anything similar to:
In your profile? |
That I used as example and was originally able to repro, found a bug, and was able to fix. So with that example it doesn't repro for me any more 😭 is there more code around it (I noticed it was indented)? |
This is my profile:
|
This issue has been marked as fixed. It has been automatically closed for housekeeping purposes. |
No actually I copied the code from there again and put it into Code. |
Dont know why the bot marks this as fixed? |
Dont know what VSVim is, but yes I use a custom prompt. Posted the code in one of the previous posts. |
Have to look. its a corporate client, so dont want to mangle to much with it. will see what I can do, but you know its weekend here already ;-) |
I could not reproduce the issue in the following environment:
I tried with English keyboard enabled and German keyboard enabled, and
Not sure if I miss something in the environment. |
As a sidenote. Feature CTRL+Spacebar (Menu Complete from psreadline) does not work. |
It's tricky. Starting Windows Terminal normally did not repro for me; it only repro'd when I used the PowerShell shortcut to start the app. I have no idea why 🙄 |
In English, in the "I started the terminal" scenario, After closing the two windows and switching to German, the "I started the terminal" scenario remains the same, but the "PowerShell shortcut started the terminal" both shows Shift, Control, D2 and emits a quote. Something funky with PSReadLine and localization. I'm going to transfer the issue, I guess? |
Maybe something funky there, but I'm not clear how is |
I'm agreement, I'm not clear how it's related, but I'm 85% sure it is given that the environments where |
One more thing about this comment from #3937
I believe "Doing a clear" means pressing Besides, the "Queue empty" exception after 2 |
@daxian-dbw and I did some digging. In this thread he found, microsoft/terminal#6454 (comment) indicates that So we're going to test sending some other character, something simple, like |
Soo we've learned two things:
When I switched to |
Dongbo and I are continuing to debug...we think we've found a race condition. |
When will this come into vscode-powershell extension? |
Working on it! Today or at the latest, tomorrow. |
Worked on it today. Never had the issue again so far. Also the Choice is now working. |
Hurrah! Thanks so much for all your help testing @MrFly72. This ended up being a race condition in the pair threads spawned by PSReadLine. The place we'd originally put the consumption of the faux key meant to cause ReadKey to return was in a different thread than the cancellation token was getting updated, so when the former lost the race, it wouldn't consume the key as intended! All thanks to @SeeminglyScience for figuring that out. |
Pretty cool. Glad that I could help ;-) |
Prerequisites
Summary
When using the commands Get-Credentials or read-host (dont know if there might be others), a " will be written to the inputline after the command finished.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Use any of these in debugging with F8 (not F5):
Visuals
2020-04-13_PS_VSCode_KeyPress.mp4
Logs
No response
The text was updated successfully, but these errors were encountered: