How to attach to process on .NET console app in Docker container running in WSL2?

Viewed 113

I have a C# .NET CORE console application running in a Docker container, which runs in WSL2 Ubuntu 20.04.

Now I would like to use Visual Studio (in Windows) to debug that C# console app running in that Docker container.

How can I do it in Visual Studio? I have tried using the method suggested in here, but unsuccessful when I tried to connect to Remote System

enter image description here

Can anyone point me how to debug C# code by attaching to a process running in a Docker container hosted in WSL2?

0 Answers
Related