gpt4 book ai didi

powershell - 我们如何在终端中处理 Visual Studio Code 中的问题

转载 作者:行者123 更新时间:2023-12-04 07:16:45 24 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Re enable Import Module Psreadline warning

(1 个回答)


9 个月前关闭。




我们如何在其集成终端中处理 Visual Studio Code 中的问题?

Warning: PowerShell detected that you might be using a screen reader and has disabled PSReadLine for compatibility purposes. If you want to re-enable it, run 'Import-Module PSReadLine'.

最佳答案

根据@mklement,您实际上不应该在 PowerShell 集成控制台中看到此问题,但无论您使用哪个控制台主机,解决方法都是相同的;如果您收到警告,请导入 PSReadLine恢复 PSReadLine 的功能, 最简单的方法是添加 Import-Module PSReadLine到您的 PowerShell 配置文件。

在 PowerShell 集成控制台中,运行:

code $profile
打开您的 VS Code PowerShell 配置文件(默认情况下,它与您在其他终端中的标准 $profile 位置不同)。然后放:
Import-Module PSReadLine
在顶部,和 Save .现在您可以关闭并重新打开 PowerShell 集成控制台,或键入:
. $profile
获取最新 $profile在当前 session 中更新的代码。

请注意,PowerShell 集成控制台不同于常规 PowerShell 终端。此 session 控制 VSCode PowerShell 扩展在内部使用的 PowerShell session 。如果您使用外部 PowerShell session ( 而不是 PowerShell 集成控制台)在其中一个集成终端中获得此功能,只需将模块导入添加到标准 $profile 之一地点。

关于powershell - 我们如何在终端中处理 Visual Studio Code 中的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68716926/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com