Chapter 10. Basic Debugging
The
debugger is your friend. There is simply no more powerful tool than a
debugger for learning C# and for writing quality C# programs. The
debugger helps you understand what is really going on when your
program is running. It is the x-ray of software development, allowing
you to see inside programs and diagnose potential problems.
Without a debugger you are guessing; with a debugger you are seeing.
It is as simple as that. Whatever time you invest in learning to use
your debugger is time well spent.
The debugger is also a powerful tool for understanding code written
by others. By putting someone else's code into the
debugger and stepping through it, you can see exactly how the methods
work and what data they manipulate.
This book assumes you are working with Visual Studio .NET. The
debugger we'll investigate is the powerful symbolic
debugger
integrated within Visual
Studio .NET.
The VS.NET debugger provides a number of windows for watching and
interacting with your program while it executes. Getting comfortable
with the debugger can make the difference between quickly finding
bugs and struggling for hours or days.
|