Home » Questions » Computers [ Ask a new question ]

JavaScript Troubleshooting Tools in Internet Explorer

JavaScript Troubleshooting Tools in Internet Explorer

"I use Firebug and the Mozilla JS console heavily, but every now and then I run into an IE-only JavaScript bug, which is really hard to locate (ex: error on line 724, when the source HTML only has 200 lines).

I would love to have a lightweight JS tool (a la firebug) for Internet Explorer, something I can install in seconds on a client's PC if I run into an error and then uninstall. Some Microsoft tools take some serious download and configuration time.

Any ideas?"

Asked by: Guest | Views: 142
Total answers/comments: 4
Guest [Entry]

"You might find Firebug Lite useful for that.

Its bookmarklet should be especially useful when debugging on a user's machine."
Guest [Entry]

"Since Internet Explorer 8, IE has been shipping with a pretty impressive set of tools for JavaScript debugging, profiling, and more. Like most other browsers, the developer tools are accessible by pressing F12 on your keyboard.

Script Tab

The Script tab is likely what you'll be interested in, though the Console, Profiler, and Network tabs get plenty of use as well while debugging applications.

From the Script tab you can:

Format JavaScript to make it more readable
Move from source to source of various resources on the page
Insert breakpoints
Move in and over lines of code while stepping through its execution
Watch variables
Inspect the call stack to see how code was executed
Toggle breakpoints
and more...
Console Tab

The console tab is great for when you need to execute some arbitrary code against the application. I use this to check the return of certain methods, or even to quickly test solutions for answers on Stack Overflow.

Profiler Tab

The profile is awesome if you're looking for long-running processes, or trying to optimize your code to run smoother or make fewer calls to resource-intensive methods. Open up any page and click ""Start profiling"" from the Profiler tab to start recording.

While the profiler is working, you can move about the page, performing common actions. When you feel you've recorded enough, hit ""Stop profiling."" You will then be shown a summary of all functions ran, or a call tree. You can quickly sort this data by various columns:

Network Tab

The network tab will record traffic on your site/application. It's very handy for finding files that aren't being downloaded, hanging, or for tracking data that is being requested asynchronously.

Within this tab you can also move between a Summary view and a Detailed view. Within the Detailed view you can inspect headers sent with requests, and responses. You can view cookie information, check the timing of events, and more.

I'm not really doing the IE Developer Tools justice - there is a lot of uncovered ground. I would encourage you to check them out though, and make them a part of your development."
Guest [Entry]

"I would recommend Companion JS.

This is the free version of Debug Bar but I find it easier to use and have the features I need. Great to test little JavaScript snippets in IE the same way I do with Firebug in Firefox.

EDIT 5 years later: I now uses Internet Explorer integrated developer tools."
Guest [Entry]

IE 8 is supposed to have better tools, but the IE Developer Toolbar is pretty good.