英文:
Azure functions: test locally in VS Code
问题
我按照这个指南:https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-typescript?pivots=nodejs-model-v3#run-the-function-locally
来在本地运行 Azure 函数。
而且没有办法查看详细的错误消息。
没有办法进行调试...我想知道是什么导致了这个 500 错误。
有关如何在 VS Code 中本地运行/测试/调试 Azure 函数的任何建议吗?
英文:
I followed this guide: https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-typescript?pivots=nodejs-model-v3#run-the-function-locally
to run Azure function locally.
I see error message on the bottom right corner of the VS Code:
And there is no way to see the detailed error message.
There is no way to debug...I want to know what caused this 500 error.
Any suggestions on how to run / test / debug Azure function locally in VS Code?
答案1
得分: 1
- 转到视图=> 输出=>它将打开带有日志的输出窗口。
- 在Visual Studio Code中打开命令面板(ctrl+shift+p),搜索
Developer:Show logs
(或者)Developer: Open Logs folder
并选择。
- 选择
Developer:Show logs
后,将在输出窗口中显示日志:
- 您也可以在VScode终端中运行
func host start --debug
,它将显示错误详细信息:
英文:
You can follow below steps to check the error logs in Visual studio code:
- Go to View=> Output=> it will open Output window with the logs.
- Open command palette in visual studio code(ctrl+shift+p), search for
Developer:Show logs
(or)Developer: Open Logs folder
and select.
- Once you select
Developer:Show logs
, it will display the logs in output window:
- You can also run
func host start --debug
in VScode terminal, it will display the error details:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论