使用 vscode 调试 Azure Function
我一直在努力使用 vscode 调试 HttpTrigger
类型的 azure 函数。
我的假设是,问题可能与 .vscode/
中的配置文件有关,或者最坏的情况是与我自己的环境有关。
截至目前,当我尝试调试最近创建的函数(func init)时,我从 vscode 收到以下错误:
> Executing task: dotnet clean /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <
execvp(3) failed.: Permission denied
The terminal process "dotnet 'clean', '/property:GenerateFullPaths=true', '/consoleloggerparameters:NoSummary'" failed to launch (exit code: 1)
Inside .vscode/
There 4 files:
├── extensions.json ├── launch.json ├── settings.json └── tasks.json
and inside task.json There are some dotnet导致上述错误的相关命令。
尽管这些文件是由核心工具 (func) 自动生成的,但我从 task.json 中删除了 dotnet 行并点击“调试”。
几秒钟后我得到:
Failed to detect running Functions host within "60" seconds. You may want to adjust the "azureFunctions.pickProcessTimeout" setting.
是否有任何命令可以自动生成调试配置?例如 “.NET 生成用于构建和调试的资产”
您是否遇到过类似的情况?
我的环境设置:
OS: Ubuntu 20.04.4 LTS
Code:1.64.2 x64
Azure Functions Extension: v1.6.0
Core Tools Version: 3.0.3904
I've been struggling to debug an HttpTrigger
type azure function with vscode.
My assumption is that the issue might be related to the config files within .vscode/
or at worst, my own environment.
As of now, when I try to debug a recently created function (func init) I get the following error from vscode:
> Executing task: dotnet clean /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <
execvp(3) failed.: Permission denied
The terminal process "dotnet 'clean', '/property:GenerateFullPaths=true', '/consoleloggerparameters:NoSummary'" failed to launch (exit code: 1)
Inside .vscode/
there 4 files:
├── extensions.json ├── launch.json ├── settings.json └── tasks.json
and inside task.json there are a few dotnet related commands that are causing the error above.
Despite these files being automatically generated by core tools (func) I removed the dotnet lines from task.json and hit Debug.
After a few seconds I get:
Failed to detect running Functions host within "60" seconds. You may want to adjust the "azureFunctions.pickProcessTimeout" setting.
Is there any command to automatically generate the debug configuration? e.g. ".NET generate assets for build and debug"
Have you faced anything similar to it?
My env settings:
OS: Ubuntu 20.04.4 LTS
Code:1.64.2 x64
Azure Functions Extension: v1.6.0
Core Tools Version: 3.0.3904
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将
tasks.json
中的type
从 process 替换为 shell 解决了这个问题。Replacing the
type
from process to shell insidetasks.json
solved it.