Skip to content

System.ArgumentOutOfRangeException when using PSReadLine in VS Code #4196

@superprogramer123

Description

@superprogramer123

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

I encountered a `System.ArgumentOutOfRangeException` while using PSReadLine in Visual Studio Code. The error message indicates that the value must be greater than or equal to zero and less than the console's buffer size. The actual value was -2.

Screenshot

Capture
3
2

Environment data

Psreadline version: PSReadline 2.0.0
powershell vesrion:Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  4894
operating system details:CsName            : DESKTOP-618M4H9
OsName            : Microsoft Windows 10 Pro
OsArchitecture    : 64-bit
WindowsVersion    : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406

Steps to reproduce

  1. Open Visual Studio Code.
  2. Open the integrated terminal.
  3. Click the play button to run the script.
  4. Observe the error message.

Expected behavior

the code runs without displaying error messages

Actual behavior

When I clicked the play button in VS Code, I received a System.ArgumentOutOfRangeException error. The error message indicated that the value must be greater than or equal to zero and less than the console's buffer size. The actual value was -2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions