Home | Blog | Screencasts | Projects
# Sunday, November 01, 2009

I’ve been playing around with VS 2010 beta 2, I’ve got it installed in one of my development VM’s which is also running the SharePoint application that I’ve been working on for the past few months. This SharePoint application is using the 3.5 SP1 version of the .NET framework and we haven’t yet migrated the solution and projects to VS 2010, they are all in the 2008 format. I bring this point up, because the profiling tools in VS 2010 don’t need a solution to be open in order to profile an application.

 

If your not familiar with the profiling features in VS 2010 then you should take a read of both the Profiler team blog post and also the post from John Robbins (debugging and profiling god).

 

The first step to be able to profile any .net application is:

 

1. Open the visual studio 2010 command prompt

2. Run the following command:  vsperfclrenv /globalsampleon

3. Restart IIS  

4. Now from VS you can select the Profiler –> Attach/Detach option from the Analyze menu option

 

image

 

5. Now you can run through your application and the profiling information will be captured.

6. Once your done you’ll be taken to the main overview screen:

 

ProfileOverview

 

7. Now you can drill into the hot paths etc … The blog posts I’ve listed above can help you drill into this in more detail.

8. To turn off the profiling switch just run vsperfclrenv /globaloff and restart IIS

 

The best bit is, if you have debugging symbols all the features will work, that is you can right click on the hot paths and the offending line of code will be shown and highlighted. So you don’t need to convert your project to VS 2010 to get this great profiling feature, it works with previous versions of the .NET framework.

Sunday, November 01, 2009 1:39:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
VS 2010
Statistics
Total Posts: 190
This Year: 3
This Month: 0
This Week: 0
Comments: 38