To unset a breakpoint we just click the relevant line of code and click the Toggle Breakpoint icon again, and that toggles it off. We can set as many or few breakpoints at one time as we wish, so if we want to break on other lines we can add breakpoints there too. Click that line then click the Toggle Breakpoint icon on the toolbar, illustrated here.Īny line with a breakpoint on it is indicated by the reddish-brown dot on the left of the code window and by the line itself being set to a reddish brown, although the line may not always be colored. To set the breakpoint, we need to scroll up the code window in the debugger until we can see the line on which we want to put the breakpoint. We should see a page of times tables from 1*1=1 to 11*12=132 in the browser. (However, note that when using Visual InterDev, it's a play button icon like that on a video recorder.) Let's do that then we can return to the browser and see the results of the code we have executed. If we've finished debugging, we can run the rest of the code without stepping through each line by clicking the Run icon on the toolbar, which we illustrate here. We should find ourselves back at the document.write("") line. Well, no prizes for guessing that the Step Over icon that we talked about previously is what we need to click to do this.Ĭlick the Step Over icon and the function will be executed, but without us having to step through it statement by statement. We've already seen this in action, so really we want to step over it and go to the next line. Clicking Step Into twice more brings us back to the calling of the writeTimesTable() function. Click Step Into again and execution will continue to the condition part of the for loop. When we load this into our browser, the script debugger will be opened by the debugger statement, as shown in Figure 10-15.Ĭlick the Step Into icon to see that the document.write() line will be executed and the next statement in the flow of execution is the increment part of our for loop. See the end of the next section for how to enable the script debugger, and then check for the menu option again. If we do not find this menu option, it is still possible that the script debugger is already installed, but disabled. If one of the menu options is Script Debugger, as shown in Figure 10-3, the debugger is installed. To see if the script debugger is already installed, open up Internet Explorer and select the View menu. If it is not checked, then check it and click Next to install it. Click the Add/Remove Windows Components button, and in the window that opens, scroll down the list to the script debugger. To install it open the Control Panel and choose Add/Remove Programs. In addition, Windows 2000 automatically comes with the script debugger, although it may not be set up on your system. Other programs, such as Visual InterDev, which is part of Visual Studio, also automatically install the script debugger. If Personal Web Server (PWS) or Internet Information Services IIS are installed, which we'll be looking at in a later chapter, the script debugger should already be installed. If these URLs change, a search on the Microsoft website,, for "script debugger" ought to find its new home. Use this URL when running Windows NT, 2000, or XP: We can currently download the script debugger from the following URL if we are running Windows 98 or ME:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |