Introduction

Several good books talk about debugging strategies. I could use this chapter to talk about such strategies in general, but then we couldn't explore the new debugging capabilities in Visual Basic .NET. So, given that choice, I'll discuss the latter. I recommend getting a book devoted to debugging if you don't already own one.

I will give you a piece of general advice: if you want bug-free code, don't write any bugs. This sounds a bit cheeky, but I have found that programmers who write singular, well-named, short methods end up with very few bugs.

A singular method is a method that does one thing. A well-named method uses a name that conveys exactly what the method does; such names usually rely heavily on verbs and nouns. A short method, ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.