【发布时间】:2020-12-30 04:05:57
【问题描述】:
我在 Widows Server 2012 R2 上使用 VSCode 版本 1.49.0 用户设置。我用它来开发powershell。我的 Windows 10 笔记本电脑上没有这个问题,但在我需要进行开发工作的服务器上却有,因为我针对 sharepoint 2013 本地对象模型编写代码。
我安装了 Windows8.1-KB3118401 当启动控制台时,我得到以下信息:
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-Command', 'Import-Module'c :\Users\first.last.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; 开始-EditorServices -HostName 'Visual Studio 代码主机' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\first.last.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell 集成控制台 v2020.6.0
当我尝试运行 hello world 测试脚本时,我得到:
在 PowerShell 会话之前无法调试或运行 Powershell 脚本 已经开始。等待 PowerShell 会话完成启动并尝试 再次。
来源:PowerShell 预览(扩展)
这似乎与微软的 Powershell 2020.6.0 扩展有关,因为一旦我启用它就会引发错误。
知道如何让我的 powershell 再次工作吗?
【问题讨论】:
标签: visual-studio-code powershell-4.0