Slow debugging issue in Visual Studio

2019-01-03 13:26发布

In my Visual Studio, even I just wrote a single line of return in a C# console application, it will take me a minute after pressing F5 to execute the actual code (I mean the time it takes to stop on the single return statement after pressing F5 -- I set a breakpoint on return statement in Main function). I am wondering what is wrong? Any check list? Thanks!

I am using Visual Studio 2008 VSTS edition and debugging on Windows Server 2003 x64.

thanks in advance, George

24条回答
相关推荐>>
2楼-- · 2019-01-03 13:52

I had a similar issue and none of the other guidance seemed to help. I had rebooted to no avail. I had removed all breakpoints, deleted the suo file, checked that symbols weren't being loaded from external sources, and checked that no paths existed in the application that was unavailable.

Then, I thought to clean the solution. I noticed in the output window that C# IntelliSense reported an issue when cleaning:

There was a problem reading metadata from '{B0C3592F-F0D1-4B79-BE20-3AD610B07C23}' ('The system cannot find the file specified.'). IntelliSense may not work properly until the solution is reloaded.

In this case, once you actually discover the error message, it tells you exactly how to resolve it. (Good job on the error text, poor job on discoverability!) I unloaded the solution's projects, then reloaded them. I was then able to successfully run clean solution. It worked, and the debugger did as well.

HTH

查看更多
唯我独甜
3楼-- · 2019-01-03 13:55

Had this problem. After trying all the listed advice and removing all visual studio extensions, we finally figured out that somehow IntelliTrace was enabled. Disabling that fixed everything.

http://msdn.microsoft.com/en-us/library/dd264948%28v=vs.100%29.aspx

查看更多
狗以群分
4楼-- · 2019-01-03 13:55

I experienced the same slow down, and disconnecting from the network fixed the problem for me as some other comments and answers have stated (But of course that is not an ideal fix).

For my case this one simple change fixed my solution: In the project properties on the debug tab I disabled "Enable the Visual Studio hosting process." (I am running VS2010)

查看更多
做个烂人
5楼-- · 2019-01-03 13:57

In my case changing debug symbol "Automatically load symbol for" option from "all modules" to "only specified modules" solved the problem. You can change this option from Tools -> Options -> Debugging ->Symbols

查看更多
走好不送
6楼-- · 2019-01-03 13:58

I had this problem too, but it had nothing to do with breakpoints in my case. It was code shortcuts that I added in the tasks window:

http://www.customsoftwareframeworks.com/blog/longwaittimetoinsertoraddalineoftextbuginvisualstudio--tasklistwindow--onlywhenaddingandremovelines

I'm sure there are other ways you could see a problem like this, but there is a bug somewhere that caused this problem for me...deleting all my options would have fixed this, but that is something that I did not want to do. So, I debugged it and wrote about it in my blog...your problem sounds like mine.

Thanks.

查看更多
该账号已被封号
7楼-- · 2019-01-03 13:59

Make sure you don't have any stale network mappings to servers that no longer exist (network timeouts will kill you). Or use something like Process Monitor to see if a network (or other file error) seems to be blocking for a long time.

查看更多
登录 后发表回答