powershell - 如何在 Visual Studio Code 中停止正在运行的 PowerShell 命令?

标签 powershell visual-studio-code

我找不到如何使用键盘快捷键停止正在运行的 PowerShell 命令。我的命令是:

do {ping 127.0.0.1} until (Test-Path -Path C:\Users\foobar)

如何使用键盘快捷键停止此命令? 我可以按回收站图标,但这会完全终止我的 PowerShell 扩展,然后 VS Code 会要求重新启动它。

我尝试了网上的一些命令,例如Ctrl+Alt+M,但它并没有停止执行。

最佳答案

(从 Olaf 的评论迁移)

[The default command for ending a running PowerShell script or command is] just like in the console:
Ctrl+C

关于powershell - 如何在 Visual Studio Code 中停止正在运行的 PowerShell 命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54503493/

相关文章:

Powershell:在 Windows 10 中获取 GPS 坐标 - 使用 Windows Location API?

Python 在一段时间后挂起,按下 [Enter] 后继续

powershell - 从selection.insertcaption完全删除标签

PowerShell - 在远程机器上执行脚本给出错误

arrays - 将 PowerShell 数组传递给函数时如何展开它

visual-studio-code - 多种语言条件下的键绑定(bind)

php - 突出显示 vscode 中未使用的变量

go - 如何在VS Code中使用参数“./…”调试Go测试

visual-studio-code - 如何在 vscode 中删除这些竖线。我不知道这些是否来自任何扩展

visual-studio - 让 Visual Studio 使用 VS 代码快捷键/键绑定(bind)