You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
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