1. 问题 使用插件 C/C++ Compile Run 时报错,顺着提示链接到 github 看 issue(异常: System.ArgumentOutOfRangeException: 该值必须大于或等于零,且必须小于控制台缓冲区在该维度的大小。 #1548),是要求更新 PSReadline。 ================================================================================================== 2、解决办法: 更新并激活 PSReadline (1) 关闭所有终端,包括 cmd,PowerShell,VSCode 里的终端等 (2)管理员模式打开 PowerShell win+r,输入 powershell (3)、 运行命令安装最新版 PSReadline 参考:https://github.com/PowerShell/PSReadLine 先吐槽一下,这玩意真TM慢啊~ # 下面这几句备用 #Get-Module Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force Install-Module -Name PowerShellGet -Force 管理员身份运行 PowerShell 执行:get-ExecutionPolicy,若显示 Restricted 表示状态是禁止的 执行:set-ExecutionPolicy,会提示输入参数 输入 RemoteSigned 会提示进行选择 输入:Y,回车 Import-Module PowerShellGet Install-Module PSReadLine -Force Import-Module PSReadLine