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
In VS 2022, I tried to Configure and Attach remote debugger for Azure Container Apps.
Please check the below Workaround.
ASP.Net Web API
and Enabled docker.Thanks to @ryanchill, as mentioned, Remote Debugging for Azure Container Apps is not supported as of now.
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:
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.