Skip to content

Command prompt has unpredictable cursor location while debugging #698

Closed
@codearoo

Description

@codearoo
  • VSCode Version: Code 1.11.2 (6eaebe3b9c70406d67c97779468c324a7a95db0e, 2017-04-13T08:03:11.395Z)
  • OS Version: Windows_NT ia32 10.0.10586
  • Extensions:
Extension Author Version
python donjayamanne 0.6.0
tslint eg2 0.11.0
odoo-snippets jeffery9 0.2.5
MagicPython magicstack 1.0.9
csharp ms-vscode 1.8.1
PowerShell ms-vscode 0.12.2
debugger-for-chrome msjsdiag 2.7.2
python tht13 0.2.3

Steps to Reproduce:

  1. 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

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."

`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions