I am experiencing difficulty debugging an azure functions project in VS Code. I created an azure project in using func init. When i click Debug from the run menu, the project builds, but on trying to run "func host start" the following error manifests:
> 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
If i run func host start manually from powershell it works fine.
So far i have tried:
Would appreciate any assistance figuring this out.
A lot of googling found a suggestion to change the default terminal in vs code. it was set to powershell, but changing it to command prompt resolved the issue.
Setting is found in the command pallet by typing "Terminal: Select Default Profile. This brings up a list of available terminals, command prompt, gitbash, windows powershell, .net powershell.
selecting command prompt allows debugging.
thanks for the help all!