Attaching Visual Studio debugger causes high CPU usage and UI thread locks
问题 I have a WPF app that does some async networking (negotiation over 100 sockets in parallel). If I launch app with VS debugger attached and start networking code my CPU usage jumps to 60% (shared between VS, VS debugger and vshost processes) and UI becomes very unresponsive with constant freezes up to 3 seconds. The same happens when I attach a debugger to already running process. Under normal conditions it uses 1-3% CPU and UI is smooth. VS profiler in "CPU usage" mode shows that CPU is used