'Remote debugging suddenly stopped working, and troubleshooting yields no clear culprit where the problem could be

My remote debugger suddenly stopped working. This morning, it worked fine. This afternoon, I can't use it, and neither can at least 2 other members of my team nor can our build server which hasn't been updated, making a total of 4 systems, none of which have the same histories. 2 of the systems have .NET 5 SDK, two have .NET 6. 3 of the systems are running the latest code and 1 is running older code (we're regressing as I write this, no changes so far). Visual studio 2022 (17.2.0) doesn't give an error, just seems to attach without actually functioning (I can even terminate the process it is "attached" to without repercussion)- it still looks like it's attached, and nothing, not even debug messages or symbol loads, appears in the Output-Debug window. VS 2019 (16.11.14) simply fails with an error message saying "One or more errors occurred. Failed to launch debug adapter. Additional information may be available in the output window. The operation was canceled." At least it fails, but there's nothing in the output window to say why. There are 3 separate devices we're trying to debug, on 2 different networks. All are exhibiting the same problem. I don't expect easy answers here, but if you could give me an idea what I should try to troubleshoot next I'd appreciate it.

To sum up: 4 different systems, 3 different modules, 3 different revisions of code, 2 different networks, 2 different versions of visual studio. All exhibiting the same problem. If we could narrow it down to a single issue, that would make a big difference. Any ideas?



Solution 1:[1]

So this might be a long shot but it worked for our issue. Try uninstalling and reinstalling the vsdbg (Remote Debugging).

Our setup is VSCode with C# debugging inside docker containers. My team mate was using Mac, I was using Windows WSL2. After an upgrade to VSCode both our setups quit working, we were no longer able to debug. Everything built fine and the containers would run like normal but only fail when you attempted to debug. The culprit turned out to be vsdbg. The solution was to uninstall/delete and let VSCode reinstall it on the first attempt to debug again.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Frank