Slide 1: How To Debug Javascript In
Internet Explorer
Jonathan Boutelle
Slide 2: 3 Options
• Microsoft Script Debugger
– pathetic
• Visual Studio .Net
– Expensive and overkill
• Microsoft Script Editor
– The best option
Slide 3: Configuring Script Editor
• Not well documented
• Bundled with Office XP / 2003!
– Yes, this is wierd
• This presentation will show you how
Slide 4: tools->internet options->advanced
Make sure Script debugging is NOT disabled
Slide 5: Install Office
• Office XP OR Office 2003 will do
• No other versions have it
Slide 6: View->Script Debugger->Open
Slide 7: You should see this
If you don’t, make sure you have the right
version of Office.
Slide 8: Using the debugger
Slide 9: Method 1: break at next statement
Slide 10: Method 2: debugger calls in
javascript
• debugger;
• Puts a break point in both IE and
Venkmen (Firefox debugger)
• Makes your code ugly: not recommended
Slide 11: When you hit a breakpoint
Runtime Error is NOT a bug: perfectly normal
Slide 12: Select Microsoft Script Debugger
Slide 13: Wow: a real debugger!
Slide 14: Cleanup
• Make sure you shut down the debugger
before shutting down IE
• F5 = continue
• Then close the debugger
• Remember, IE is “part of the operating
system”: you don’t want it to hang!