PerfTips – Easiest way to get Performance Information during Debugging in Visual Studio 2015

By | July 25, 2015

It had been always a pain point for developers to find out execution time, performance issues for different code block. Most of the time we Get time of Code Execution Using StopWatch , or other logging mechanism, profiler tool etc. However, they are time consuming and sometime does not add values to check for a single methods, smaller code segments.  Visual Studio 2015 makes our life easier. Getting the performance information is now in your finger tip and you can inspect this information during debugging itself.

PerTips is enabled by default. So when you start debugging your app,  you should be able to view the time elapsed .  Run the application in debug mode, and step through the lines by F10. You should be to see the time elapsed during the execution of previous statement. You can also consider the right side simple code block just to understand the time elapsed part.    As shown in the below code block, LoadIntialData() has a 1000 ms thread sleep. The next statement shows, how many milliseconds has been elapsed for overall method call.

image    image



If you mouse hover on the time elapsed, a tool tip message would display which say the total time taken for the execution and that’s also includes the debugging overhead.



On click of the Time Elapsed option, Visual Studio will open the Diagnostic Tool Window, where you can deep down to the internal events to see the details of time.


You really don’t need have breakpoint or step through all the line, you can easily jumped into end of the method, and see the total elapsed time between two break points of  between code blocks.

image image

As shown in the above image, you can see total time elapsed for the LoadIntialData() is 1,269 ms.  And this time tool tip message is something different, which says, the time elapsed since previous breakpoints. Visual Studio is smart enough to identify the step by step execution or block executionexcution and display results accordingly.

To get more inside of PerfTip, Please Read this post.

7 thoughts on “PerfTips – Easiest way to get Performance Information during Debugging in Visual Studio 2015

  1. Pingback: How To customize PerfTips Color in Visual Studio 2015 ?

  2. Tung Nguyen

    Thanks Abhijit

    Thanks for sharing. I think it’s the coolest feature in VS2015 we have. Do you think so?

  3. Abhijit Jana Post author

    Thanks Mate.

    True. It is really a great feature ( have you checked this one too ? How To customize PerfTips Colors in Visual Studio 2015 ? .. . But there are many more.. I personally liked this one and debugging Lambda ( in watch windows, Immidiate window and also in DataTips.. ) . Please have a look into the new post .Debugging Lambda Expression in Visual Studio 2015 – Watch Windows, Immediate Windows and also in Data Tips
    and let me know what you think.

  4. Pingback: 10 New features of Visual Studio 2015 that you should know | Abhijit's World of .NET

  5. Pingback: .NET Tips and Tricks from Daily .NET Tips – ( Visual Studio 2015, Windows Universal App Development, Microsoft Band, Xamarin ) – July 2015 Links | Abhijit's World of .NET

  6. Pingback: Working with Live XAML in Windows Universal Apps and Visual Studio 2015

  7. Pingback: Visual Studio – Developer Top Ten for August 5th, 2015 - Dmitry Lyalin

Comments are closed.