The IDE will add a debug configuration to .vscode/launch.json to launch the application in a container. Debug .NET applications running in local containers with VS Code, Three ways to containerize .NET applications on Red Hat OpenShift, Set up continuous integration for .NET Core with OpenShift Pipelines, Debug .NET applications running on Kubernetes with VS Code, Containerize .NET applications without writing Dockerfiles, How to configure Helm charts using JKube, part 2, Red Hat Developer roundup: Best of July 2022, SaaS security in Kubernetes environments: A layered approach. The .vscode/tasks.json file contains a few tasks that are used in this process: The docker-build step uses the Dockerfile that was added to the workspace. With all the pieces matching, it was time to prove that everything is working the way I think it is. Next, launch VS Code and install the C# extension and Docker extension. However, what interests us most, regarding our investigation, is the docker exec command. But we still dont know how Visual Studio communicates with the debugger running in the interactive session. You can also do a Debug file deployment from Visual Studio into the running container. From the top Debug menu, click Attach to Process to open the Attach to Process dialog. For Connection target, click Find. The WinDbg output for the first
visual studio docker debug