powershell - 调试在 Visual Studio Code 中突然停止

标签 powershell visual-studio-code vscode-debugger

我正在使用 Visual Studio Code 调试 PowerShell,一切都按预期工作。当我按下 F5 并且调试完全停止时,突然间我开始看到下面两条消息。我重新安装了 PowerShell 插件,但没有用。

Debug adapter process has terminated unexpectedly

Timed out waiting for the PowerShell extension to start.

enter image description here

编辑: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 或更高版本中可用。


Mapusoftthe 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 as Remove All, and all went magically to work again?

关于powershell - 调试在 Visual Studio Code 中突然停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51052467/

相关文章:

powershell - Merge-SPLogFile- 不返回任何记录

powershell - 使用Powershell递归设置文件夹的权限?

ruby - rspec --init 不工作/`mkd ir':无效参数 - ./C: (Errno::EINVAL)

c# - 如何将 .Net Core Web Api 从 VS Code 发布到 Azure?

angular - VSCode 找不到模块 '@angular/core' 或任何其他模块

powershell - 选择字符串模式匹配和不匹配

visual-studio-code - Visual Studio Code 中有书签吗?

powershell - Visual Studio Code 中的多线程调试

javascript - vscode-test 设置中的 runTest.ts 类即使在示例项目中也从未使用过,它有什么用?

react-native - 为VSCode导出REACT_EDITOR