Script debugging tips

Monica wrote a very nice document for this feature.

A few quick highlights:

  • Internet explorer defaults to having script debugging disabled. IE also likes to disable script debugging when you install a new version of IE (example: XP SP2). In IE, go to Tools->Internet Options->Advanced. Prior to Windows XP SP2, the option you needed to uncheck was 'Disable Script Debugging'. In XP SP2, the IE team decided to split this into two separate options – 'Disable Script Debugging (Internet Explorer)' and 'Disable Script Debugging (Other)'. The 'Other' option control script debugging in other applications that use mshtml.dll such as Outlook.
  • Try to keep all of your script running in the same script block. IE will sometimes get confused if you have more then one.
  • To debug client side script that is in a .ASPX file, you will need to either open the .ASPX file from the Running Documents window (called the 'Script Documents' window in Visual Studio 2005), or set a breakpoint by function name (Ctrl-B).