views:

156

answers:

4

What is a good profiler for .NET 4.0? I'm willing to spend some money, but not too much (say up to £50)

I'm developing games for windows phone and xbox using XNA, which means that the projects are commercial. I mention it because I've seen several which are free for non commercial use.

Extra points for Visual studio integration.

Nb. I'm using Visual Studio Professional 2010

+2  A: 

Visual Studio 2010 has a pretty good builtin profiler (only available in the Premium and Ultimate editions though)

Another great profiler is dotTrace.

I only listed the profilers I know support .Net 4.0 right now, but do take a look at this older question about .Net profilers. Maybe some of them have recently added support for .Net 4.0 too. In any case, I don't think there are any new profilers out there, since it's a pretty complex topic.

Mauricio Scheffer
@Maruricio: does dotTrace have .NET 4.0 support yet?
John Saunders
Unfortunately I can get a free copy of visual studio pro, so I'm stuck using pro
Martin
@John: yes, dotTrace 4.0 beta (latest version as of this writing) supports .Net 4.0
Mauricio Scheffer
@Mauricio: thanks.
John Saunders
Unfortunately at £156 dotTrace is way beyond my price range
Martin
@Martin: edited my answer, take a look at the other question
Mauricio Scheffer
For VS2010, the profiler is in Premium and Ultimate (there are no "Team" editions in VS2010).
Chris Schmich
@Chris Schmich: thanks, fixed my answer
Mauricio Scheffer
+1  A: 

Slim Tune is a great profiler

Lavinski
SlimTune doesn't currently support .net4
Martin
A: 

Everybody wants a profiler, but this low-tech method works just fine.

Mike Dunlavey
While it *is possible* to do this, it's not really viable, you waste too much time.
Mauricio Scheffer
@Mauricio Scheffer: It is understandable to have such opinions if it has not been tried. In my experience (and others on SO) it finds problems very quickly, while people are still trying to get their profilers installed, get them running, figure out what the output means, and realize they don't always tell what they need to know.
Mike Dunlavey
... Here's a list of myths that many profilers are prone to, including the one in VS, if I'm not mistaken: http://stackoverflow.com/questions/1777556/alternatives-to-gprof/1779343#1779343
Mike Dunlavey
@Mike: I don't know why you would assume that kind of things about me. I do use low-tech/poor-man profiling methods (in fact I have blogged about one: http://bugsquash.blogspot.com/2009/08/poor-man-profiler-with-windsor.html) but I still think a good profiler is better and faster in 99% of the cases, at least for the kind of code *I've* been handling so far in my short career.
Mauricio Scheffer
@Mauricio Scheffer: Sorry - I know people on SO are just trying to help each other. In my long career I see people trying out motorcycles, Volkswagens, Maseratis, when a rowboat does the job (though it's OK to put a motor on it). It's a different perspective - not a top-down approach of measuring time, and being concerned about accuracy, but rather a bottom-up approach of asking what it is doing and *why*, on only a rough percentage basis, looking at lines, not functions, and looking at wall-clock time, not CPU time, ignoring irrelevant stuff like recursion.
Mike Dunlavey