Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Saturday, September 19, 2015

Useful Debugging Features of Visual Studio 2015

Debugging Features VS2015


PerfTips

This is one of my favorite features. You can view the time elapsed between the current breakpoint and the previous breakpoint.

In the picture above, we can see that fetching the employees took 1235ms approx.
So if we want to find out the time taken by any code snippet, we don't have to get current time before and get current time after and subtract the two values to get the time taken by the code snippet. We can simply put breakpoints in the Debug mode and find the time taken. This will save us a lot of time when we are looking for performance issues in our application.
Clicking on the Perftip further takes us to the diagnostic data which shows Memory Usage and CPU Usage for the application which is more helpful if we want to dig deeper into the diagnostics.

Lambda Expression Debugging

This is one of the feature which I will be using the most. I use lambda expressions pretty often in my code. Earlier, I was not able to see the results in Watch or Immediate window.
But now, I can see them at both the places.

Edit in Debug Mode

Yes, you read correctly that one. When we are at a breakpoint, we can edit the C# code and hit save and continue. We don't have to stop debugging anymore in order to make changes to C# code. Isn't it cool? This will certainly save us time during debugging and fixing code.

References Counts

On top of every class ,property and method we will see the number of references. This feature was available in Visual Studio 2013 Ultimate but now it's available in Visual Studio 2015 Professional too. Here, Employee class has 7 references and if source control is set up, it will also show number of authors and changes as well.


Yellow Light Bulb

The new Visual Studio comes with a yellow light bulb which will fill some light in our lives ;) (bad joke :P) . If you click on that, you can get suggestions on what it can do for us. For example, implement Interface with Preview. This feature is similar to the one provided by Resharper already but it's better than that because it shows me the Preview as well. Resharper had only one option: Implement Members whereas Visual Studio allows me to preview as well as implement and a few more options.

Conclusion

These are some of the features that I explored so far and really liked. I will be talking about more such features, as I explore them, in future posts.
For future updates to my weekly blog, please subscribe to my blog via the "Subscribe To Weekly Post" feature at the right

No comments:

Post a Comment