wil*_*yth 1 visual-studio-code azure-functions
我在 VS Code 中调试 Azure Functions 项目时遇到困难。我使用 func init 创建了一个天蓝色项目。当我从运行菜单中单击“调试”时,项目会生成,但在尝试运行“func host start”时,会出现以下错误:
> Executing task: func host start <
-Command : The term '-Command' is not recognized as the name of a cmdlet, function, script file, or opera
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ -Command func host start
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (-Command:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)
如果我从 powershell 手动运行 func host start ,它工作正常。
到目前为止我已经尝试过:
希望能得到任何帮助来解决这个问题。
很多谷歌搜索发现了更改 VS Code 中默认终端的建议。它被设置为 powershell,但将其更改为命令提示符解决了该问题。
通过输入“终端:选择默认配置文件”可以在命令托盘中找到设置。这将显示可用终端、命令提示符、gitbash、windows powershell、.net powershell 的列表。
选择命令提示符可以进行调试。
感谢大家的帮助!
归档时间: |
|
查看次数: |
7038 次 |
最近记录: |