Forum Discussion
Remote debug options for Linux container on App Services
We run .Net hosted on Linux Docker containers running in App Service. This makes debugging very difficult as while there is an option for remote debugging, this is only for Windows containers.
https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure-app-service?view=visualstudio
The only option I can find for Linux is the one detailed in the link below from 2018 which involves running an SSH server in the Docker container and using an extension which doesn't seem to have a stable version.
az extension add --name webapp
az : WARNING: No stable version of 'webapp' to install. Preview versions allowed.
https://azure.github.io/AppService/2018/05/07/New-SSH-Experience-and-Remote-Debugging-for-Linux-Web-Apps.html
Are there any currently supported options for remote debugging in Linux containers? Are there any plans to introduce the remote debug feature for Linux App Services?
3 Replies
Today I would plan around SSH/tunnel-based diagnostics rather than expecting the Windows App Service "Remote Debugging" switch to work for Linux containers.
For Linux custom containers on App Service, the supported path is to enable SSH in the container, then connect through App Service SSH or `az webapp ssh`. For .NET, you can sometimes attach from Visual Studio to a Linux process over SSH, but it is not the same as the App Service Windows remote debugger experience and it requires the container to expose a usable SSH environment. In production, I would keep that off by default and use a separate debug slot or a temporary diagnostic image.
For routine troubleshooting, I would combine:
1. App Service log stream and container logs.
2. Application Insights/OpenTelemetry traces.
3. SSH only for short-lived inspection.
4. A staging slot with the same image and config for deeper attach-to-process debugging.
Useful docs:
https://learn.microsoft.com/azure/app-service/configure-linux-open-ssh-session
https://learn.microsoft.com/visualstudio/debugger/remote-debugging-dotnet-core-linux-with-ssh
- LouisTCopper Contributor
Thanks for confirming, but I'd like to request this be put on the roadmap, or at least document in detail what settings are needed to get the SSH connection to Linux to work from Visual Studio.
Seems no, Visual Studio remote debugging is NOT supported for Linux App Service (including containers).The built‑in “Remote Debugging” feature only applies to Windows App Service, for Linux:You must use SSH / attach-to-process / tunneling-based approaches, to my understanding, there is no roadmap yet for full remote debugging parity to Linux App Service.\
Remote Debug ASP.NET Core on Azure App Service - Visual Studio (Windows) | Microsoft Learn