[.net] Slow debugging in VS2005 (C#)

Started by
19 comments, last by avnerz 16 years, 2 months ago
The issue appears to be the MS Debugging Assistant which does the on-the-fly CLR code modifications which add debugging power but can kill performance. Check out the MSDEV 2005 product feedback entry that explains the issue (the post discusses the MDA problem in the context of C++ std::string, but the issue is common across managed and unmanaged code):.

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=e976ea2a-ba1e-4537-9493-46af9429a81e

The quickest workaround for me was to set COMPLUS_MDA to 0 in the env vars - I set it and restarted Dev Studio and Walla! it was working as fast as it used to in 2003! You can also control this setting from the registry, and you can also do it per application using a config file (probably the best way). You'll find the details on how to disable the MDA here:

http://msdn2.microsoft.com/en-us/library/d21c150d(en-US,VS.80).aspx

I hope this spares some of you out there debugging agony like it did for me - I was having too many coffee cups after hitting F5 :)

As you can see from the product feedback correspondence, MS was aware of this issue since Beta.

Note that VS 2008 has the same issue.

This topic is closed to new replies.

Advertisement