Practical .NET

Insider: Secrets of Debugging

Faced with reviewing large swaths of other people's code, Peter Vogel is left to ask: what does it really take to be good at debugging?

Even with following a Test Driven Development regime, my code doesn't work the first time (pretend you're surprised). So debugging is a critical skill for me. Also, as a hired gun, I'm frequently having to deal with someone else's code, which often isn't working the way everyone expected it to.

One thing I have noticed: I'm better at debugging than a lot of the people I work with. My first step is to look at the evidence to make sure that I know what the problem is. A lot of people seem to feel that the first step is to SOLVE THE PROBLEM. They look at some of the symptoms, assume that they know what the underlying problem is and then start implementing a solution -- which usually means that we end up with two problems where we originally only had one. But I've already written about what I consider the essence of the debugging technique (getting a good description of the problem) and the mental tools for achieving that goal. Feel free to read it and disagree.

Lately, however, I've been reviewing a large whack of code with an eye to improving its quality and performance. That means that I've been reviewing my debugging and analysis toolkit. And that's led me to writing up some of the resources that you have available in the .NET/Visual Studio environment and may not be aware of. Those topics are so short that they don't really belong in this forum, so you'll see them turning up as weekly tips in my .NET Tips and Tricks blog over the next few weeks.

But I wonder: Can people learn to "debug better?" Or are some people just good at debugging and every else is just good at generating bugs? You tell me.

About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at http://blog.learningtree.com/tag/ui/.

comments powered by Disqus

Featured

  • Death of the Dev Machine?

    Here's a takeaway from this week's Ignite 2020 event: An advanced Azure cloud portends the death of the traditional, high-powered dev machine packed with computing, memory and storage components.

  • COVID-19 Is Ignite 2020's Elephant in the Room: 'Frankly, It Sucks'

    As in all things of our new reality, there was no escaping the drastic changes in routine caused by the COVID-19 pandemic during Microsoft's big Ignite 2020 developer/IT pro conference, this week shifted to an online-only event after drawing tens of thousands of in-person attendees in years past.

  • Visual Studio 2019 v16.8 Preview Update Adds Codespaces

    To coincide with the Microsoft Ignite 2020 IT pro/developer event, the Visual Studio dev team shipped a new update, Visual Studio 2019 v16.8 Preview 3.1, with the main attraction being support for cloud-hosted Codespaces, now in a limited beta.

  • Speed Lines Graphic

    New for Blazor: Azure Static Web Apps Support

    With Blazor taking the .NET web development world by storm, one of the first announcements during Microsoft's Ignite 2020 developer/IT event was its new support in Azure Static Web Apps.

  • Entity Framework Core 5 RC1 Is Feature Complete, Ready for Production

    The first release candidate for Entity Framework 5 -- Microsoft's object-database mapper for .NET -- has shipped with a go live license, ready for production.

Upcoming Events