# Tuesday, December 21, 2004
« Implementing the Split function in C# | Main | Tip of the Day: Determining which contro... »

I don't think you can be a real effective ASP.Net programmer (personal opinion alert) unless you can do SOME javascript. Postbacks not only increase your server load, they can also detract from your user's experience on your ASP.Net site.

The downside is that working with javascript is that it's always been tough to debug (if not impossible), as well as untyped, but that part's an aside. Well, it's tough no more. Here's today's tip(s). First, enabling debugging:

  1. Open your browser, open the Tools menu, and select the Internet Options menu item.
  2. On the Advanced tab, locate the Browser section, and uncheck “Disable Script Debugging“ (see image below).
  3. When you fire up the ASP.Net debugger (either manually or by default), make sure the “Client Script“ option is selected.
  4. Trigger the javascript.

Image 1: Browser Options

Image 2: Setting the script debugging in the Process Debugging command in .Net

OK, you're all set for debugging. So what! Well, the thing I learned today was how to break into the script (without an error, which causes it to trigger debugging automatically) is to add the following script where you want to break:

debugger;

Your web page will break right there, and you'll be able to step through it just like you would your normal ASP.Net page, with local variable browsing and everything!