![](/img/trans.png)
[英]Not able to create Azure Logic App workflow using Visual Studio Code
[英]Not able to debug Azure Logic App workflow using Visual Studio Code
我正在关注本教程。
我现在可以在 Visual Studio Code 中创建工作流,并且可以在设计器中看到它。
但除此之外,单击概览后,我无法看到此处提到的 url。
我收到这条消息
Workflow run history could not be loaded. Error: 'Could not establish connection to the host. Run your function project to view the run history. Failed to fetch.'
我错过了什么?
我确保 Azurite正在运行。
Ngrok也被配置了。
而我的 local.settings.json 文件如下所示。
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_V2_COMPATIBILITY_MODE": "true",
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "node",
"WORKFLOWS_TENANT_ID": "d5y4kk56-f47h-df6h-2g7k-sd4fk8f5j5zd",
"WORKFLOWS_SUBSCRIPTION_ID": "876af6yz-6xxx-1234-2nh7-xxx234gygrkls",
"WORKFLOWS_RESOURCE_GROUP_NAME": "vivek-logic-app-trial-rg",
"WORKFLOWS_LOCATION_NAME": "centralindia",
"WORKFLOWS_MANAGEMENT_BASE_URI": "https://management.azure.com/",
"Workflows.WebhookRedirectHostUri": "http://e91c-115-96-216-18.ngrok.io"
}
}
不仅如此,当我按 F5 时,我收到以下错误,我不清楚它在说什么。
Error message: correlationId='683df22d-5928-4149-97cc-2ee3116aa6d0', operationName='SubscriptionExtensions.ToCachedSubscription', message='Resource provider namespace is empty for subscription 'myedgeenvironment', properties '{"tenantId":"myedgeenvironment-tenantId","registeredFeatures":[]}'.', exception='<null>', organizationId='', activityVector='IN.02', additionalProperties='', extensionVersion='1.0.0.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='683df22d-5928-4149-97cc-2ee3116aa6d0'.
也在github Azure-Functions上提出。
更新
乌馆 2
我现在明白了
感谢@VivekDev的更新,我终于找到了问题所在,经过了很长时间,终于可以在VS CODE 中调试逻辑应用了。 以下是我遵循的步骤:
2.根据我的sdk版本在我的根文件夹中添加了global.json
文件
这是 localsettings.json 文件示例代码,您可以根据您的凭据尝试使用以下代码。
"IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true", "FUNCTIONS_WORKER_RUNTIME": "node", "WORKFLOWS_TENANT_ID": "", "WORKFLOWS_SUBSCRIPTION_ID": "", "WORKFLOWS_RESOURCE_GROUP_NAME": "xxxxxx", "WORKFLOWS_LOCATION_NAME": "westus2", "WORKFLOWS_MANAGEMENT_BASE_URI": "https://management.azure.com/"
ngrok http 7071
连接到port 7071
7071。Then run the logic app and meanwhile go to workflow.json overview tab and then you will get url ,(may be you will get the same error at that time in your terminal) Copy and browse that same url in your browser then check in vs逻辑应用程序在此处成功运行的代码是以下屏幕截图以供参考。
成功运行工作流
参考:- 微软文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.