Repository navigation
System.ArgumentOutOfRangeException #5160
Description
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
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 200 Keys:
x e " , " o n l y E n t r y p o i n t " : f a l s e , " a u t o A t t a c h M o d e " : " a l w a y s " , " f i l e C a l l b a c k " : " C : \ \ U s e r s \ \ r e m o t e \ \ A p p D a t a \ \ L o c a l \ \ T e m p \ \ n o d e - d e b u g - c a l l b a c k - 6 c 9 1 c 3 7 f 9 9 d 0 2 7 e 2 " } ' ; Space & Space ' C : \ P r o g r a m Space F i l e s \ n o d e j s \ n p m . c m d ' Space ' r u n ' Space ' d e v ' Space Enter
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -16.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------Screenshot
getting this error in vscode debugger on node application.
Environment data
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 200 Keys:
x e " , " o n l y E n t r y p o i n t " : f a l s e , " a u t o A t t a c h M o d e " : " a l w a y s " , " f i l e C a l l b a c k " : " C : \ \ U s e r s \ \ r e m o t e \ \ A p p D a t a \ \ L o c a l \ \ T e m p \ \ n o d e - d e b u g - c a l l b a c k - 6 c 9 1 c 3 7 f 9 9 d 0 2 7 e 2 " } ' ; Space & Space ' C : \ P r o g r a m Space F i l e s \ n o d e j s \ n p m . c m d ' Space ' r u n ' Space ' d e v ' Space Enter
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -16.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)Steps to reproduce
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
Last 200 Keys:
x e " , " o n l y E n t r y p o i n t " : f a l s e , " a u t o A t t a c h M o d e " : " a l w a y s " , " f i l e C a l l b a c k " : " C : \ \ U s e r s \ \ r e m o t e \ \ A p p D a t a \ \ L o c a l \ \ T e m p \ \ n o d e - d e b u g - c a l l b a c k - 6 c 9 1 c 3 7 f 9 9 d 0 2 7 e 2 " } ' ; Space & Space ' C : \ P r o g r a m Space F i l e s \ n o d e j s \ n p m . c m d ' Space ' r u n ' Space ' d e v ' Space Enter
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -16.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
Expected behavior
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
Last 200 Keys:
x e " , " o n l y E n t r y p o i n t " : f a l s e , " a u t o A t t a c h M o d e " : " a l w a y s " , " f i l e C a l l b a c k " : " C : \ \ U s e r s \ \ r e m o t e \ \ A p p D a t a \ \ L o c a l \ \ T e m p \ \ n o d e - d e b u g - c a l l b a c k - 6 c 9 1 c 3 7 f 9 9 d 0 2 7 e 2 " } ' ; Space & Space ' C : \ P r o g r a m Space F i l e s \ n o d e j s \ n p m . c m d ' Space ' r u n ' Space ' d e v ' Space Enter
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -16.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
Actual behavior
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
Last 200 Keys:
x e " , " o n l y E n t r y p o i n t " : f a l s e , " a u t o A t t a c h M o d e " : " a l w a y s " , " f i l e C a l l b a c k " : " C : \ \ U s e r s \ \ r e m o t e \ \ A p p D a t a \ \ L o c a l \ \ T e m p \ \ n o d e - d e b u g - c a l l b a c k - 6 c 9 1 c 3 7 f 9 9 d 0 2 7 e 2 " } ' ; Space & Space ' C : \ P r o g r a m Space F i l e s \ n o d e j s \ n p m . c m d ' Space ' r u n ' Space ' d e v ' Space Enter
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -16.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
Activity
github-actions commentedon May 28, 2026
This issue was already fixed (see #1306). Please upgrade to the 2.3.5 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.