
142
Chapter 5
CHAPTER FIVE
Debugging
Hacks 36–43
The ability to debug an application is arguably what turns an excellent text
editor into an interactive development environment. Without debugging,
Visual Studio is really just a feature-rich text editor that allows you to com-
pile applications. With debugging, Visual Studio turns into an invaluable
development tool. If I were to argue the merits of using an IDE versus using
just a normal text editor to develop applications, debugging would be one of
the pillars of my argument.
Visual Studio provides a rich debugging experience. You can set break-
points in your code, step through application execution line by line, and
read and set the value of variables while the application is executing.
The hacks in this chapter show you how to get the most out of debugging
with Visual Studio. You will learn how to set breakpoints, troubleshoot
breakpoints, and halt the execution of your application when exceptions are
thrown. You will also learn how to debug scripting languages like Java-
Script and VBScript, as well as how to debug T-SQL that’s running on an
instance of SQL Server.
This chapter will help you learn how to better debug your applications, lead-
ing to more productive development and more efficient bug resolution.
All of the code discussed in this chapter can be downloaded
from the book’s web site (see the Preface for more details).