Debugging Javascript in IE6

  • 4,057 views
Uploaded on

Microsoft’s Internet Explorer 6 is almost universally hated by web developers. It’s hard to work with and support, but with a few solid techniques, you can make the process less painful. What “just …

Microsoft’s Internet Explorer 6 is almost universally hated by web developers. It’s hard to work with and support, but with a few solid techniques, you can make the process less painful. What “just works” in the majority of browsers will almost always require hours of tweaks and workarounds to get it working in IE6. With more and more users switching over to newer alternatives such as IE8, Safari and Firefox hopefully support for IE6 can be dropped sooner rather than later. In the mean time though many of us have to make sure our sites work in this awful browser. This presentation shows you how!

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
4,057
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
7
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Getting started - Open Tools > Internet Options > Advanced - Enable the “script debugging” option - Restart IE Now when IE6 runs into a javascript problem it will prompt you to debug the issue with Visual Studio. You can also use the free Express Edition
  • 2. Debugging Just seeing the cause of the problem highlighted is sometimes enough for us to work out what has gone wrong. In more complex cases we can use Visual Studio's debugging windows to help us get more information and diagnose the problem. The windows can be accessed via the Debug > Windows menu.
  • 3. Locals Window Shows us all the local variables, their type, and their value. Keyboard shortcut: Ctrl+D, L
  • 4. Call Stack Window Shows the current call stack, and allows us to step back through the stack. Keyboard shortcut: Ctrl+D, C
  • 5. Immediate Window By far the most powerful debugging tool that Visual Studio has to offer, allowing us to evaluate javascript expressions on the fly. We can inspect global variables, assign values to any variable within the current scope, and evaluate any expression we want! Keyboard shortcut: Ctrl+D, I
  • 6. Immediate Window Trick The immediate window displays object values but doesn't display anything for functions. Trick: “alert(function_variable)” will display the function's code in an alert message! Use “alert(argument.callee)” to display the code of the calling function.
  • 7. More Information These slides are based on a blog post available at Six Revisions, which includes far more detail and lots of examples. Also take a look at www.coderholic.com. Feedback or questions: ben@coderholic.com