OzCode – Visual Studio C# Debugging Made Better

As I mentioned in my essential list of tools for the .NET developer, I have two VS extensions that I rely on more than any – ReSharper and OzCode.  Since ReSharper has already captured the imaginations of most .NET devs who have an Internet connection, I thought it only fair to write about one of the best, most polished and most useful plugins I’ve ever used right out of the box – OzCode – which takes debugging in Visual Studio to the next level.

I’ve often thought that the debugging experience in VS could use a facelift – it’s essentially the same as it was years and years ago (think QuickBASIC) with some niceties added on.  Enter OzCode to make all of our lives easier.  It’s hard to explain how it’s useful without showing you, so I’ll just jump right in and talk about my four favorite features – all with helpful visuals!

Reveal

Easily the feature I use the most, Reveal allows you to “favorite” properties on objects, which puts those properties front and center when inspecting an object, either by hovering over it or using the Watch window.  Both methods typically display the result of its ToString() method, which isn’t usually overloaded by objects – Reveal makes that irrelevant by allowing you to display the properties you want to see.  Very useful when inspecting lists!

OzCode's Reveal Feature

Magic Glance

Magic Glance gives you a heads-up display that displays the values of the parameters and variables within a method’s scope.  We’ve all spent time hovering over variable names or adding variables to the Watch window, attempting to get values for those variables in the middle of debugging.  Magic Glance takes the need for this away – it displays the value of the variables inline with your code while you’re debugging.  It even displays information you’ve selected using the Reveal feature!

OzCode's Magic Glance

Exception Trail

Exception trail gives you a nice heads-up display when an exception is thrown, which is much nicer than the one baked into Visual Studio.  It displays each previous exception thrown in a tab so you can click back through them, and you can even click and go to the line of code where the exception was thrown (and handled, if applicable.)  If there are multiple exceptions caught and thrown in different layers of your application, the exceptions display in a chain, allowing you to click through them.  You can even immediately click and search for that exception in Google and StackOverflow!

OzCode's Exception Trail

Search/Filter

On more than one occasion, I’ve inspected a list of objects in the debugger looking for an object or objects with a property that has a specific value.  Though the Reveal feature already makes this easier, Search and Filter take it even further, allowing you to easily look for the objects you want to inspect, either by using a filter with a predicate or a search box.

Search will take whatever you input in the search box and look for properties that closely match what you’ve searched.  It searches only through the first few “layers” of objects to keep it speedy, but you can search more layers if you want.

OzCode's Search

Filter is useful as well – you can enter a predicate and the list of objects you’re looking at will be reduced to the ones that match that predicate.

OzCode's Filter

Conclusion

Anyways, not much else to say except that this product is a steal for $79 (for the individual developer) or $149/seat for businesses, with discounts after the first license.  Check it out with a 30-day free trial!  It’s saved me lots of time debugging and has even made it… fun?  Against all odds…

Disclaimer: I received a free copy of OzCode in exchange for my honest opinions about the software.

Visual Studio Community - the full-featured IDE for everyone

Microsoft’s .NET Framework has gone open source. Bet that’s something no Microsoft dev expected to say 10 years ago.

The writing was on the wall in a lot of ways – they open sourced many parts of the .NET Framework earlier this year, as well as several complementary products such as ASP.NET MVC and Roslyn. It wasn’t really surprising to me that they opened up .NET’s codebase to the masses.  The jaw-dropping moment for me was the announcement about Visual Studio Community.

The Express Edition of Visual Studio is the gateway drug into the Microsoft dev world, but for serious devs it leaves you wanting more. The “no plugin” limitation is a serious handicap. I’ve been on jobs where all their consultants had to work with was Express and it always leaves me with a thought of “…really?”

Visual Studio Community changes the landscape in a big way. It’s basically a free version of Visual Studio Professional. Pro has a steep entry point for individual developers of $499 or $49/month. If you’re a student, you can get a copy of Pro for free, but licensed for non-commercial use. Small businesses and indie devs can start with BizSpark and get Pro for free (among other things), but that doesn’t last forever.

Enter Visual Studio Community, the latest free version of Visual Studio. You get the power of Visual Studio Professional and access to any and all available extensions, including ReSharper, VSCommands, and Productivity Power Tools. You can use it for education, open source development, and non-enterprise business development (enterprise is defined as having a business with $1 million in revenues per year OR 250 PCs or more.)

And, Visual Studio is not just for .NET anymore.  Visual Studio has a host of plugins that allow you to program using Node.js, PHP, and Python, to name a few.  Further, it has excellent out-of-the-box support for CSS, HTML, and JavaScript, especially with Web Essentials.

As a freelance consultant, I’m super excited to have the Pro version of Visual Studio for free. Yeah, I get that if you’re a productive consultant, you’ll make that $499 back pretty quickly, but it’s nice to know that I don’t have to be a slave to expensive yearly upgrade cycles or subscription plans. I get to have my cake and eat it too.

The new, open Microsoft will hopefully attract many more devs to use one of the greatest stacks on the market today. Strike expensive tooling and closed source off the list of reasons to NOT use the .NET stack.

What are you waiting for? Grab Visual Studio Community today!

C# versus VB.NET - the .NET showdown

I use VB.NET and C# every day.  The main application I develop for uses VB.NET, but most new development I do is in C#, so I’m pretty familiar with the strengths and weaknesses of both.  At this point in my career, I feel that I have figured out the one big difference between the two languages that keep fans of one language or the other firmly in their camp.

The main difference is nerd machismo – programmers thinking they are more “real” than other programmers because they use one language/toolset/strategy over a perceived “inferior” alternative.  And the worst offenders in the .NET realm tend to be C# programmers.

I’ve heard it all – VB.NET is a toy language, lets programmers form bad habits, has a horrible syntax.  Most things I hear are a matter of opinion anyways.  Here are the facts:

  • VB.NET is a first-class .NET language.
  • VB.NET has features that C# doesn’t, and C# has features that VB.NET doesn’t.  (For one thing, I love VB.NET’s auto-properties because I can set the value on the same line as the auto-property, something that C# is getting in its next version.)
  • VB.NET and C# interoperability is seamless (in my experience, which is quite a bit.)

If given a choice between C# and VB.NET for a new project, I’d pick C# because I prefer it.  And that’s all.  I don’t think one is better than the other because, objectively, one isn’t better than the other for every possible application.  The differences tend to come with how one person uses it over another, but that’s just a matter of experience.

Pick which one you’re more comfortable with and go with it.  Don’t let others’ opinions sway you because they believe that one language is vastly superior to the other because it’s simply not true.  Besides, when you have the power of the .NET Framework, you’re on the same team!  It’s not VB.NET vs. C#, it’s VB.NET and C#.