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

PerfTips – Easiest way to get Performance Information during Debugging in Visual Studio 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.

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

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

  1. Abhijit Jana 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.

Comments are closed.