我正在使用 Visual Studio Code 调试 PowerShell,一切都按预期工作。当我按下 F5 并且调试完全停止时,突然间我开始看到下面两条消息。我重新安装了 PowerShell 插件,但没有用。
Debug adapter process has terminated unexpectedly
Timed out waiting for the PowerShell extension to start.
编辑:2018 年 7 月 27 日
我的问题上次自动解决了。是的,我什么都没做,它开始工作了。今天问题重现。我重新安装了 VSC 和 Extention,但对我来说都不起作用。
另一条消息开始出现
Timed out waiting for the PowerShell extension to start.
最佳答案
这在一个月前的最近 PowerShell/vscode-powershell issue 1334 中可以看到。
Can't execute scripts on debugger using
F5 - Start Debugging
.
Even a simple one like this.
write-host "Test"
Using the F8 shortcut it works.
错误报告正在审核中。
2018 年 8 月更新:PR 725 将关闭该问题。
There's a lot of race condition fixes in the PSRL changes, but that was mostly through adding locks.
Those areas could probably benefit from similar refactorings, the locks were more like stop gaps.
它将在 PowerShell/PowerShellEditorServices 1.8.4 或更高版本中可用。
Mapusoft 在 the comments 中添加:
In my case, the problem was a whole day, and it ended just when I removed all the watched expression from former inspections.
As simple asRemove All
, and all went magically to work again?
关于powershell - 调试在 Visual Studio Code 中突然停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51052467/