10.02.2014 Views

Beginning Ajax With ASP.NET (2006).pdf

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Debugging<br />

Figure 13-12<br />

Right-clicking on the cntrl variable with the mouse brings up a context menu, again similar to<br />

the menu presented to users when they are debugging server-side code. Traditional debugging<br />

mechanisms are available such as Add watch to add the display of the cntrl variable to the<br />

Watch window at the bottom of the display. These features are discussed in more detail later in<br />

this chapter. Alternatively, a developer can open a Quick watch window that allows the developer<br />

to open a dialog box that provides for easy examination of the variables contents. This window<br />

is similar to the Watch window but provides a more direct and prevalent way of interacting<br />

with and examining a specific variable. A modal window is presented for the user to navigate;<br />

the sole purpose is to display the contents of the selected variable only. The functionality is otherwise<br />

almost identical to the Watch window. The only real difference is the availability of a<br />

Reevaluate button to allow a new variable to be entered into the text entry field and examined.<br />

8. Press F10 again to advance the programs execution to the next line. Program execution should<br />

now be paused on the line that reads:<br />

number++;<br />

9. Position the mouse over the number variable. The debugger should display the value of the<br />

number variable, as shown in Figure 13-13.<br />

Currently, the value of the number variable is as expected — that is, it is equal to the contents of<br />

the input textbox control defined within the form.<br />

Figure 13-13<br />

339

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!