skip to Main Content

I will have 50-60 microservices each built as asp.net web API, all running within a single Azure Container Apps environment, each able to synchronously communicate with each other via DAPR.

Is it possible to attach (via VS Code or VS) a debugger such that I can debug through the code on any of these services running within Azure Container Apps?

2

Answers


  1. In VS 2022, I tried to Configure and Attach remote debugger for Azure Container Apps.

    Please check the below Workaround.

    • Created ASP.Net Web API and Enabled docker.

    enter image description here

    • Published the Web App to Azure Container App.
    • In VS => Debug => Attach to Process, tried to connect to the remote , got the below error.

    enter image description here

    Thanks to @ryanchill, as mentioned, Remote Debugging for Azure Container Apps is not supported as of now.

    Login or Signup to reply.
  2. Remote debugging is currently not available with Azure Container Apps. One workaround to this could be to view the log streams for your deployed Container Apps: https://learn.microsoft.com/en-us/azure/container-apps/log-streaming?tabs=bash

    You can use the AZ CLI to achieve this:

    az containerapp logs show --name <container-app-name> --resource-group <rg-name> --tail
    

    There are more parameters you can pass in, described in this doc: https://learn.microsoft.com/en-us/cli/azure/containerapp/logs?view=azure-cli-latest

    The console logs will stream logs from your container console. The system logs will stream logs from the Container Apps service itself. This include Dapr logs such as components being created, updated or failed to be created. You can read more about the difference here: https://learn.microsoft.com/sr-Cyrl-RS/azure/container-apps/logging

    This isn’t the most elegant way of debugging (you’ll probably have to leg checkpoints in the code to see where the code fails), but it’s a workaround for now.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search