Skip to main content

Posts

Showing posts from March, 2015

Improve Your Code Quality Using Live Code Analyzers

Live Code Analyzers are used to add custom error messages and warnings that appear live as you're typing, along with automatic code fixes to help you clean them up. They are available as NuGet packages that you add to your projects in Visual Studio 2015. In this video, you'll see how the FxCop analyzer package now helps you improve your code even before you build. You'll also see the Azure Code Analysis package, which teaches you best practices for building Azure apps by spotting bugs the moment you introduce them.

What is Visual Studio Online?

Visual Studio Online, based on the capabilities of Team Foundation Server with additional cloud services, is the online home for your development projects. Get up and running in minutes on our cloud infrastructure without having to install or configure a single server. Visual Studio Online connects to Visual Studio, Eclipse, Xcode, and other Git clients to support development for a variety of platforms and languages. Each Visual Studio Online account comes with five free users. As your team expands or your needs grow, mix and match user plans and resources to give each user what they need. You can also add stakeholders to your account to view project status or provide feedback on work. Visual Studio with MSDN subscribers are free to join account projects exclusive of the included five free users. Read More at  https://www.visualstudio.com/en-us/products/what-is-visual-studio-online-vs.aspx

New Breakpoint Configuration Experience in Visual Studio 2015

If you use Visual Studio to develop code, the chances are good that you set breakpoints on a regular basis as part of debugging. You may however not be aware that  breakpoints can be configured with conditions and actions to improve your debugging productivity . In  Visual Studio "14"  Microsoft introduce an improved experience that makes configuring breakpoints significantly easier to find and use for breakpoints associated with a specific line of source code: Conditional statements  break only when conditions you specify are met. Think of this as adding an “if” statement to your code and placing the breakpoint inside the “if” statement so it is only hit when the conditions you entered are true. Hit counts  break only after the breakpoint has been hit a certain number of times. These are useful in situations where code is called multiple times, and you either know the exactly when it is failing, or have a general idea that “it fails after at least” a certain number of t

Support for debugging lambda expressions with Visual Studio 2015

Anyone who uses LINQ (or lambdas in general) and the debugger will quickly discover the dreaded message “Expression cannot contain lambda expressions”. Lack of lambda support has been a limitation of the Visual Studio Debugger ever since Lambdas were added to C# and Visual Basic.  With visual studio 2015 Microsoft has added support for debugging lambda expressions. Let’s first look at an example, and then I’ll walk you through current limitations. Example To try this yourself, create a new C# Console app with this code: using System.Diagnostics; using System.Linq; class Program { static void Main() { float[] values = Enumerable.Range(0, 100).Select(i => (float)i / 10).ToArray(); Debugger.Break(); } } Then compile, start debugging, and add “values.Where(v => (int)v == 3).ToArray()” in the Watch window. You’ll be happy to see the same as what the screenshot above shows you. I am using Visual Studio 2015 Preview and it has some limitations.