Skip to content

Powershell crash when dropping .bat file into VScode Powershell terminal #4772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
Fabimawn opened this issue Jun 5, 2025 · 1 comment
Closed
3 tasks done

Comments

@Fabimawn
Copy link

Fabimawn commented Jun 5, 2025

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

Empty powershell console when dropping in a batch file named: Backup source SSUpdaterTool.bat in Visual Code.

Powershell exception:
-----------------------------------------------------------------------     
Last 1 Keys:
 &

Exception:
System.ArgumentOutOfRangeException: De waarde moet groter zijn dan of gelijk zijn aan nul en minder zijn dan de buffergrootte van de console in die dimensie.
Parameternaam: left
Werkelijke waarde was -2.
   bij System.Console.SetCursorPosition(Int32 left, Int32 top)
   bij Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
   bij Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   bij Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   bij Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   bij Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   bij Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)       
   bij Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   bij Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)      
-----------------------------------------------------------------------



Visual code info:
Version: 1.99.0
Commit: 4437686ffebaf200fa4a6e6e67f735f3edf24ada
Date: 2025-04-02T21:35:19.530Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.19045

Screenshot

Image

Environment data

PS Version: 5.1.19041.5848
PS HostName: ConsoleHost
PSReadLine Version: 2.0.0-beta2       
PSReadLine EditMode: Windows
OS: 10.0.19041.320 (WinBuild.160101.0800)
BufferWidth: 38
BufferHeight: 13

Steps to reproduce

Stated in exception report.

Expected behavior

The file name appearing in the console, so I can press enter to run it.

Actual behavior

Crashes the moment I drop the batch file into the powershell terminal from the VScode file tree.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jun 5, 2025
Copy link

github-actions bot commented Jun 5, 2025

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.

@github-actions github-actions bot closed this as completed Jun 5, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant