Microsoft Visual studio as an IDE has matured over the years and now as a developer we are eagerly awaiting release of Visual Studio 2015 later this year.
In this post,i will be talking about what’s good in Visual studio 2015 CTP 6 (released on Feb 23rd) for debugging and profiling your code.I will be mostly covering the C# features.There are two major enhancements in Visual Studio 2015
- Debugging UI refresh – Peak implemented
The break-point experience is more enhanced with an option to apply conditions and actions in the same peak screen while setting the break-point.
1. Conditional Expression – you can apply complex conditional statements using && and ||.
2. Hit Count – Mostly useful when you want to hit a break-point in a for or a while loop.
3.Filter is useful when you are remotely debugging or thread/process based debugging.
If the first condition is not satisfied the other conditions separated by AND will become redundant.
The another happy side of break-point experience is if you by mistake disabled or deleted the break-point.You can still retrieve all your details by UNDOing or through Ctrl+Z.Isn’t that simple but useful to make our lives happy.
Visual studio has taken minute care in building break-point UI experience.When you first set a break-point you see red Circle -> If you set a condition the red circle has a circle -> If an action is added it becomes a rhombus.Check this it is fun to watch
Actions help you trace the break-point flow by logging information.You can continue tracing through without breaking the execution flow.
- Support for debugging lambda/LINQ expressions
Till visual studio 2013,If you try adding a LINQ or Lambda expression to a quick watch or immediate window to evaluate in runtime,it throws an error saying “The expression is not supported…“. From Visual studio 2015,its not the case anymore.You can evaluate lambda/LINQ expressions through Watch or Immediate windows.Limitations as of today
As visual studio is still in CTP6,there are few limitations as of today,
- Don’t currently support lambda expressions that require calls to native function like LINQ-to-SQL
- ASP.NET 5 with 64-bit IIS and remote debugging ASP.NET 5 is not supported. The debugger will automatically use the old expression evaluator in these cases.
Just to make you more happy,
Microsoft respects its developers feedback and all the features mentioned above are an example of this.If you don’t believe this pic explains it all.This is a survey asking developers about edit & continue features