Chapter 20. Debugging and Tracing Pages

In This Chapter

  • Design-time errors and squiggly lines

  • Compiling errors with the compiler

  • Debugging logic errors

  • Setting breakpoints and values

  • Tracing problems to the root

The following scene happens to all of us:

Someone (perhaps a boss) finally expresses an interest in what you've been working on for the last week or so and asks for a quick demonstration. The visitor sits at your keyboard (drives in geekspeak) and starts exploring as you look on, beaming. Suddenly, disaster strikes! Your beautiful page displays an ugly error message:

Object reference not set to an instance of an object.

The visitor politely offers to come back another time while you turn to find out what happened. Welcome to the world of bugs and debugging. This chapter explores the features of the integrated development environment's (IDE) debugger and the tools that give you an inside look at your code while it executes.

Note: The Express version of VWD doesn't include some of the debugging features described here. I've included a note each time so you'll know.

Get ASP.NET 3.5 For Dummies® 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.