HTML and CSS Reference
In-Depth Information
FIGURE 6-12 A syntax error detected.
Another common situation you may face during debugging is the occurrence of an
exception . An exception is different from a syntax error: in this case, the code is syntactically
correct, but the logic is incorrect, so the program fails at run time when processing actual data.
An exception is often due to data that is either entered incorrectly by the user or generated by
code. Figure 6-13 shows an exception due to an attempt to use an undefined variable.
FIGURE 6-13 A run time error.
Pop-up windows (like the one in Figure 6-13) appear when the system detects the
exception. You stop execution by clicking Break ; by clicking Continue you instruct the
application to try to carry on. Most of the time, you just want to break execution, figure out
what went wrong, and fix the code. The Debug output window—usually located at the bottom
of the Visual Studio window—allows you to access the report about what was detected as
wrong in the application at any time (see Figure 6-14).
Search WWH ::

Custom Search