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
Debug any Powershell script and then say it prompts you for input, or it has a mandatory parameter. When you type of paste text initially it goes crazy by almost sending an Enter after each letter, and it ends up just being stuck there.
Here's how it looks on my screen:
c
d
Here's my typing the word "clear":
[DBG]: PS C:\xx> c
[DBG]: PS C:\xx>
[DBG]: PS C:\xx> l
[DBG]: PS C:\xx>
[DBG]: PS C:\xx> e
[DBG]: PS C:\xx>
[DBG]: PS C:\xx> a
[DBG]: PS C:\xx>
[DBG]: PS C:\x> r
So I killed the Terminal and restarted it and it's working normally now. But I have seen it flip back and forth between working and not.
it's messed up again. Basically after running my script. I'm not taking any input in the script itself.. I happen to be running git commands. I'll experiment a bit to see if it has anything to do with the contents of the script.
OK.. it seems to have to do with Debugging and stepping into the code, and once it starts calling a function I guess. I was stepping in and typing "get-date" in the Terminal window and once it stepped into a function I made, it got nutty like this:
[DBG]: PS C:>
[DBG]: PS C:> g
we are testing VS Powershell terminal. You entered c:\test.
[DBG]: PS C:>
[DBG]: PS C:> e
[DBG]: PS C:>
[DBG]: PS C:> t
[DBG]: PS C:> g
This is more output: do something
[DBG]: PS C:> et-date
Write-Host "we are testing VS Powershell terminal. You entered $($folder)."
Write-Host "This is more output: $( something )"
Write-Host "At some point while debugging the PowerShell terminal starts going nuts when inputting anything."
`
The text was updated successfully, but these errors were encountered:
I've seen this, it skips a letter. One goes to terminal and the next goes to the text input. I can't remember if I filled an issue for pses for this or not.
Forgot to add, when I've seen it is when using editor commands in the integrated terminal. It likely was the save if just using prompt for choice as well.
daviwil
changed the title
Powershell Terminal gets really messed up when accepting input
Input prompts have unpredictable cursor location while debugging
May 9, 2017
daviwil
changed the title
Input prompts have unpredictable cursor location while debugging
Input and command prompts have unpredictable cursor location while debugging
May 9, 2017
daviwil
changed the title
Input and command prompts have unpredictable cursor location while debugging
Command prompt has unpredictable cursor location while debugging
May 9, 2017
daviwil
added a commit
to daviwil/PowerShellEditorServices
that referenced
this issue
May 9, 2017
This change fixes an issue which causes the user's cursor location to
jump around when they type the first letter after stepping through code
or hitting multiple breakpoints sequentially. This is caused by a
hanging input listener which wasn't respecting the cancellation of its
task when it gets evaluated.
FixesPowerShell/vscode-powershell#698.
Steps to Reproduce:
Here's how it looks on my screen:
c
Here's my typing the word "clear":
[DBG]: PS C:\xx> c
[DBG]: PS C:\xx>
[DBG]: PS C:\xx> l
[DBG]: PS C:\xx>
[DBG]: PS C:\xx> e
[DBG]: PS C:\xx>
[DBG]: PS C:\xx> a
[DBG]: PS C:\xx>
[DBG]: PS C:\x> r
So I killed the Terminal and restarted it and it's working normally now. But I have seen it flip back and forth between working and not.
it's messed up again. Basically after running my script. I'm not taking any input in the script itself.. I happen to be running git commands. I'll experiment a bit to see if it has anything to do with the contents of the script.
OK.. it seems to have to do with Debugging and stepping into the code, and once it starts calling a function I guess. I was stepping in and typing "get-date" in the Terminal window and once it stepped into a function I made, it got nutty like this:
[DBG]: PS C:>
[DBG]: PS C:> g
we are testing VS Powershell terminal. You entered c:\test.
[DBG]: PS C:>
[DBG]: PS C:> e
[DBG]: PS C:>
[DBG]: PS C:> t
[DBG]: PS C:> g
This is more output: do something
[DBG]: PS C:> et-date
Code:
`param (
[Parameter(Mandatory = $true)] [string] $folder,
[switch] $pushRemotely = $false
)
function something()
{
return "do something"
}
Write-Host "we are testing VS Powershell terminal. You entered $($folder)."
Write-Host "This is more output: $( something )"
Write-Host "At some point while debugging the PowerShell terminal starts going nuts when inputting anything."
`
The text was updated successfully, but these errors were encountered: