Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Exception in VSCode when debugging PowerShell script

Abierto
#4,585 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
csharp, powershell, vscode
Área
cli

Línea de trabajo

Start at the CalculateWhereAndWhatToRender, ReallyRender, ForceRender, and ReadKey entry points named in the exception stack, then investigate the VS Code debugging and console-buffer conditions described in the report. Reproduce the sequence if possible and confirm that stopping or stepping through debugging no longer raises the cursor-position exception.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Area-Stability Needs-Triage :mag:
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 ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml
Thank you!

### Environment
PSReadLine: 2.4.0-beta0+923a890f2e7ea10465f3a80a2bc030121a1c2f68
PowerShell: 2025.0.0
OS: Microsoft Windows 10.0.20348
BufferWidth: 149
BufferHeight: 11

Last 200 Keys:

 Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace r o o Tab . g e t t Tab ) Enter
 p p UpArrow UpArrow End Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace t e Tab Enter
 UpArrow Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace r o o Tab Enter
 UpArrow Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Enter
 p UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow Enter
 p p p p p p $ v e r b s Backspace RightArrow Enter
 p p p $ s f t p p Tab Enter
 p i n RightArrow Enter
 p p p UpArrow Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Enter
 p UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 i n RightArrow Enter
 p p p p p p p p p p p p p Ctrl+s p p p p p p

### 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 'top')
Actual value was 12.
   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.CalculateWhereAndWhatToRender(Boolean cursorMovedToInitialPos, RenderData renderData, LineInfoForRendering& lineInfoForRendering)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadKey()
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)
Screenshot

Image

Environment data
PS Version: 7.4.6
PS HostName: Visual Studio Code Host
PSReadLine Version: 2.4.0-beta0
PSReadLine EditMode: Windows
OS: 10.0.20348.1 (WinBuild.160101.0800)
BufferWidth: 149
BufferHeight: 55
Steps to reproduce

Hard to tell... I stopped the debugger, stepped through some code, hit stop in VS Code and the error popped up.

Expected behavior

No exception

Actual behavior

The above exception happened

Lenguaje dominante
C#
Estrellas
4.4k
Forks
341
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PowerShell/PSReadLine

Todos los issues de PowerShell/PSReadLine

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.