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.
python/VsCode配置/插件 C++ Compile Run 时报错的解决办法...

32 lines
1.2 KiB

This file contains ambiguous Unicode characters!

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) 关闭所有终端,包括 cmdPowerShellVSCode 里的终端等
(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