If you’re a developer, you probably know by now that most of your time is NOT spent on writing awesome new code.
In fact, some companies report up to 75% of dev time is spent on debugging, and though usually a lot of this time is spent solving the issue (reproducing, designing, testing, fixing bugs, refactoring – all instead of actually writing new lines of code) – identifying the problem before designing and implementing a solution can be a tricky process, which, as of today – is not really being taught anywhere. Not to mention the process of sitting in front of your application and not understanding why something is not working as expected can be super frustrating.
So, we gathered some of the best debugging resources we could find, in order to bring you a selection of guides on how to approach debugging your code, how to actually solve certain bugs in C# and what tools you can (and should!) use.
**This post will be updated occasionally to stay relevant. Please share good articles you’d like to see here in the comments, and we might add them! **
This is a great article which not only takes you through the steps of finding and solving bugs – but takes it one step further: suggesting classifying your bugs and implement tests. This article is a great, practical step by step guide to approaching problems and creating better code.
If you ever find yourself stuck in front of a bug, feeling you’ve tried everything you know – read this. It’s short and concise, provides a high-level overview of different approaches to debugging, all waiting for you to take your pick and try something new.
Another great step-by-step guide to debugging. Has some great tips on how to avoid bugs, as well, showcasing a few code design methodologies to help you write code that’s easy to debug such as Single Responsibility Principle (SRP) and DRY (Don’t Repeat Yourself)
A begginer’s guide to debugging code – this is not very different than the guides above in the general order of the debugging steps, but tips #9 + #10 are CRUCIAL, especially for young developers.
Debugging C# / .NET
Microsoft’s own tips and tricks to using the Visual Studio 2019 debugger. Learn how to make better use of the tools and functions that are built into your Visual Studio IDE.
Tim Corey’s fantastic guide to debugging in C#, which includes a detailed, hands on video walking you through solving different bugs in a (bug ridden) hour-logging system.
Tim’s guide is a great combo between a general intro on how to approach debugging, and useful tools, tips and tricks to help you solve all the problems in your code.
In Michael’s Blog, you’ll find many debugging resources. This first one is Michael’s comprehensive guide to debugging in Visual Studio. He also has:
**This post will be updated occasionally to stay relevant. Please share good articles you’d like to see on it in the comments, and we might add them! **