20.2. Analyzing Design-Time Errors

Visual Web Developer (VWD) watches while you code (or paste code) to alert you to errors that could cause trouble at runtime. The background compilation looks for syntax errors and flags them in Source view with a squiggly underline. Look closely at the first sb.Append function in Figure 20-2; VWD has flagged it as a problem.

Pass your mouse over the squiggle to see a tooltip containing the IDE's complaint. Here's the tooltip text:

Variable 'sb' is used before it has been assigned a value.
A null reference exception could result at runtime.

For more detail on any error, including the file and exact line and column number, open the Error List pane (ViewError List), as shown in Figure 20-3.

Figure 20-2. A squiggly line marks an error or warning.
Figure 20-3. The Error List pane provides details on errors and warnings.

For now, resist the temptation to get rid of the aforementioned squiggle. You need the error in the next few pages to highlight features of the debugger.

Double-click the error description to jump to the line that's causing the error. ...

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.