We help IT Professionals succeed at work.

VS2010, Slow C# Debugging

josgood
josgood asked
on
I've been using C# for several years and am familiar with the speed of VS2008 and earlier.

VS2010 seems incredibly slow stepping from line to line in the debugger.  

Google lists various posts about IntelliTrace in beta releases of VS2010.  I can't find it in the release version.

Is IntelliTrace the most likely slowdown cause?  Is it likely something else?

I'm debugging a straightforward C# WinForms app, on 64-bit Win7.
Comment
Watch Question

Are you using Beta Version???

Same issue is Logged on connect.microsoft.com, and they are resolving it
http://connect.microsoft.com/VisualStudio/feedback/details/519265/vs2010-b2-c-express-is-slow

You can also check the msdn link for same complaint
http://social.msdn.microsoft.com/Forums/en/csharpide/thread/f18b1b8c-c9cd-4153-b0eb-7bbb352ab268
Top Expert 2007

Author

Commented:
I'm running the release version...10.0.30319.1 RTMRel.  Overall performance is comparable to VS2008.

I'm only seeing this performance issue while debugging.

One link mentioned that turning off IntelliSense didn't help, but I'd like to try that anyway.  How do I do that -- I can't find it.
Top Expert 2007

Author

Commented:
Sorry, meant IntelliTrace.
Shahan AyyubSenior Software Engineer

Commented:
See this to disable IntelliTrace:
http://msdn.microsoft.com/en-us/library/dd264948.aspx
Top Expert 2007

Author

Commented:
Thank you.

I'm running Professional, not Ultimate, so I guess that doesn't apply.

I still have VS2008 installed, so maybe I'll do my C# in VS2008.  

At work we're primarily C++ and VS2005.  I use C# in my own projects.

That's a pretty damning indictment -- a professional developer of many years, having used MS tools since the mid '90's, predisposed to like the new Studio, deciding to stay with the old version even though he has to back-convert his projects.  Not good.

I'll leave this question open for a few hours and then award points.
Shahan AyyubSenior Software Engineer

Commented:
can you see if this issue also reproduces when you disable the Visual  Studio Hosting Process?  To disable this, go to Project Properties for  the project you're debugging, go to the Debug tab, and all the way at  the bottom you'll see a checkbox "Enable the Visual Studio hosting  process."  Can you uncheck this and see if the problem goes away?
Senior Software Engineer
Commented:
the previous post was belongs to here:
http://connect.microsoft.com/VisualStudio/feedback/details/504538/debugger-hangs-vs-for-a-long-time-when-coming-out-of-debug-mode

and have a look at this: (To disable IntelliTrace)
http://visualstudiomagazine.com/articles/2010/02/18/fix-bugs-with-intellitrace-and-vs-2010.aspx

From above link:
To begin with, the IntellTrace options are located in the Tools >  Options menu and the IntelliTrace node. There are several options  available in the General, Advanced, IntelliTrace Events and Modules tab.  For our purposes we'll stick with the options on the General tab. Here  you can enable or disable IntelliTrace -- by default it is enabled.

Top Expert 2007

Author

Commented:
Shahan,

Thank you for these references...they may give a workaround.

I'm currently away from my dev box and don't expect to be on it until Wed afternoon (PST).  I will try these two options then.

Thanks for the suggestions!

Joe
Top Expert 2007

Author

Commented:
I appreciate your help...disabling Visual Studio hosting seems to help.  While still slower than 2008, stepping from line to line is now tolerable.  I'm not all that happy, but I can live with it.

I don't see how to turn off IntelliTrace.  Perhaps the Professional version doesn't support that...seems an odd omission.  I've attached .pngs showing Tools | Options.
Tools-Options.png
Tools-Options-Debugging.png
Shahan AyyubSenior Software Engineer

Commented:
I think you are right that Professionl version does not  have option of disabling intellitrace option.See the image for details.

I am using VS2008 so, i can  just search.

intellitrace.JPG
Top Expert 2007

Author

Commented:
Thank you.  I think we've taken this as far as we can, and I very much appreciate your help.
Joe
Shahan AyyubSenior Software Engineer

Commented:
No problem Glad to help you :)
Top Expert 2007

Author

Commented:
I finally realized the real issue.  Its the anti-virus.

I had it set to scan every file that gets opened.  No wonder debugging was slow!

Silly me.