0

I am following this tutorial.

I am now able to create the workflow in Visual Studio Code, and also see that in the designer.

Request Response logic app in Visual Studio Code

But further to this, I am not able to see the url as mentioned here after clicking the overview.

Overview of Azure Logic App Workflow.json file in Visual Studio Code context menu

I get this message

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.'

Overview of Azure Logic App Workflow.json file in Visual Studio Code

What am I missing?

I ensured Azurite is running.

Azurite is running

NGrok is also configured.

NGrok is configured

And my local.settings.json file looks as follows.

{
  "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"
  }
}

Not only that, when I press F5, I get the following error, not clear to me what it says.

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'.

Not able to debug Azure Logic Apps in Visual Studio Code

Raised on github Azure-Functions as well.

Update

Global.json and dotnet list sdks

Udate 2

I now get this

enter image description here

VivekDev
  • 20,868
  • 27
  • 132
  • 202
  • Hello @VivekDev, Could you please let us know are you using .net3x current version which available in your local instead of .net5 version in global.json file as its not supported to 5x versions . By running the command (dotnet --list-sdks) in your local cmd. – AjayKumarGhose Nov 18 '21 at 10:31
  • Hi @AjayKumarGhose-MT, updated the question. Please see. – VivekDev Nov 18 '21 at 13:17
  • Thank you. from the given [MS DOC](https://learn.microsoft.com/en-us/azure/logic-apps/create-single-tenant-workflows-visual-studio-code#enable-built-in-connector-authoring) So far i have tried with convert to Nuget based logic-app project and added my current .net3x version in global.json as well , After run i can able to get the URI . Could you please try to add and run again (open the shortcut menu, and select **Convert to Nuget-based Logic App project**.) Here is the screenshot : [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/2E2lE.png – AjayKumarGhose Nov 18 '21 at 13:30
  • Yes, Thanks @Liam, its obfuscated. – VivekDev Nov 19 '21 at 03:34

1 Answers1

2

Thank you for the update @VivekDev , I Finally figured out the problem and was able to debug the logic app in VS CODE after a long time. Here are the steps that i followed:

  1. Created logic app enter image description here

2.Added global.json file according to my sdk version in my root folder

enter image description here

  1. Then Convert to Nuget-based Logic App project as followed .

enter image description here

  1. Here is localsettings.json file sample code you can try with the following code according to your credential.

    "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/"
    

    enter image description here

  1. installed ngrok and authorized using my authentication token and then Connect to the port 7071 by running cmd ngrok http 7071 .

enter image description here

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 code that logic app run successfully here are the below screenshots for reference .

enter image description here

enter image description here

Finally here is my successfully running logic app : Created workflow : enter image description here

Successfully running workflow

enter image description here

REFERENCE:- MICROSOFT DOCUMENTATION

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15
  • Hi @AjayKumarGhose-MT, I flow the steps you have provided, after doing all this steps, I'm getting new error: (Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.) (Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.) Can you please suggest way out.. Thanks, – Deepak Shaw Jul 14 '22 at 10:02
  • Hello @ *Deepak Shaw*, Could you please raise a new question with the steps and the error details that you have tried ,so that we can assist you better. Thank you!! – AjayKumarGhose Jul 14 '22 at 10:11