Enabling Script Debugging
Debugging in Internet Explorer
To enable script debugging for Internet Explorer, you need to access the Internet Explorer options. In Internet Explorer, choose Tools > Internet Options. In Visual Studio, choose Tools > Options, expand the Environment node, select the Web Browser option, and click the Internet Explorer Options button. In the Internet Options dialog, enable script debugging by unchecking the "Disable script debugging (Internet Explorer)" option under the Browsing node (see Figure 1).
Figure 1 Script debugging in IE is disabled by default.
Visual Studio has dozens of useful debugging options worthy of exploration. For example, in the dialog's Debugging-General section, you can set the option "Warn if script debugging is disabled on launch" if you want to know when the target browser has debugging disabled.
Debugging in Firefox
Among the most popular Firefox plug-ins is Firebug, which is at version 1.3 as of this writing. After installing Firebug, you can set your default browser to Firefox. To set the default browser, open the Solution Explorer in Visual Studio, right-click any ASPX page, select Browse with > Firefox, and click the Set as Default button.
With Firefox established as your default browser and Firebug installed, you can debug your script in Firefox. Select Tools > Firebug > Open Firebug. The Firefox instance now shows the debugging console. To enable script debugging, click the Console tab, check the Script option, and click the "Apply settings for localhost" option.