VS 2017 - Very slow (laggy) when debugging

2020-05-14 04:32发布

When I debug my solution, vs 2017 is very laggy and slow it's like it has to operate something heavy in the background.

So it stops "responding" every 5 seconds for 2 seconds, which is very annoying. Any suggestions?

EDIT (tried suggestions):

  • Browser Link is turned off
  • Stopped customer feedback

15条回答
聊天终结者
2楼-- · 2020-05-14 05:07

After some additional investigation I found this thread Unchecking Enable Diagnostic Tools while debugging in Tools → Options → Debugging → General did the trick!

Unchecking Enable JavaScript debugging for ASP.NET in
Tools → Options → Debugging → General
makes a huge difference in performance.

查看更多
孤傲高冷的网名
3楼-- · 2020-05-14 05:07

Hiding the Threads window did the trick for me.

查看更多
爷的心禁止访问
4楼-- · 2020-05-14 05:12

I experienced same problem. In debug mode, my webforms project ran very slowly. When using Ctrl+ F5, it ran quickly (as it does when deployed). I found a try/catch block that was executing 45 times. It wasn't doing anything, it was just trapping an error that I had made. I fixed the error and, when removing the try-catch block - voila! -- back to full speed.

So if you're experiencing this problem and you've tried all the solutions above (I did), look for a try catch block that is firing often. [ Fix your error :) ] and then remove the try-catch block. I can't believe the difference it has made. Shouldn't have made any difference at all, of course, since the try-catch block wasn't doing anything, but it did.

查看更多
ら.Afraid
5楼-- · 2020-05-14 05:14

What worked for me was removing all the following folders in the solution's directory:

  • .vs
  • x64
  • Debug
  • Release
查看更多
Deceive 欺骗
6楼-- · 2020-05-14 05:15

If you are using VS 2017 Enterprise edition, try disable IntelliTrace feature (Tools -> Options -> IntelliTrace)

with this feature turned off, the laggy behavior went away even keeping the Diagnostic tools turned on (Tools -> Options -> Debugging -> Enable Diagnostic Tools while debugging)

查看更多
兄弟一词,经得起流年.
7楼-- · 2020-05-14 05:21

choosing "Load only specified modules" did the trick (Tools=>Options=>Debugging=>Symbols)

查看更多
登录 后发表回答