How to debug Javascript with IE 8
I discovered today that we can now debug Javascript With the developer tool bar plugins integreted in IE 8.
- Click ▼ Tools on the toolbar, to the right of the tabs.
- Select Developer Tools. The Developer Tools dialogue should open.
- Click the Script tab in the dialogue.
- Click the Start Debugging button.
You can use watch, breakpoint, see the call stack etc, similarly to debuggers in professional browsers.
You can also use the statement debugger;
in your JavaScript code the set a breakpoint.
how to debug javascript errors on IE8
Make sure script debugging is not disabled for IE, otherwise it should allow you to debug the script directly:
Debugging JavaScript in IE
Several options:
- Open the IE developer tools (by hitting F12 while in the browser), and use the provided JavaScript debugger. To get to know it better, see the MSDN reference on using the JavaScript debugger (and a newer reference).
- Install Debug Bar, which provides an extended feature-set to the built-in developer tools.
- Install IE Tester, which emulates various IE instances (versions), and use its built-in Debug Bar. With that approach, you can also pin-point version-specific problems.
How to debug a stack overflow error in IE8
You can debug script in IE using IE developer tools. Just press F12 to activate developer tools. IE also comes with an in built developer tool like Google chrome(not not that user friendly). But you can still use it to debug script and to watch call stack. use debugger;
like we use in other debuggers.
You can get better control in script debugging using visual studio. If you a .Net developer you can use VS itself to debug JavaScript.
Find more here
How do I dump JavaScript vars in IE8?
Here's one technique that I've found helpful:
- Open the Developer Tool Bar (hit F12)
- Go to the "Script" tab
- Click the "Start Debugging" button
- Next, type "debugger" into the console and hit enter. This should trigger a break point.
- Go to the "Watch" sub-tab
- Click the row that says, "Click to add..." and enter a variable you'd like to examine. Note that the variable must be globally available.
- At this point you should be able to examine your variable with tree-like UI
- Once you're done debugging click Continue button (or hit F5)
Using the IE8 'Developer Tools' to debug earlier IE versions
There are differences between native IE6/7 and the IE8 compatibility mode:
http://blogs.msdn.com/ie/archive/2009/03/12/site-compatibility-and-ie8.aspx
The best option I've found to debug in IE6/7 is to install the Microsoft Script Editor (not Debugger), that is bundled with Microsoft Office. It's an optional install, so you probably have to open Add remove programs in Control panel and go through setup again. Here's a guide to configure IE after you've installed the Microsoft Script Editor.
http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html
The default view doesn't have breakpoints and such, so take a look at the menu to add the views you like. It's not as good as Firebug, but it's a lot better than alert-debugging ;)
Related Topics
How to Access Google Sheet Spreadsheets Only with JavaScript
How to Listen for a Click-And-Hold in Jquery
Jest: Timer and Promise Don't Work Well. (Settimeout and Async Function)
What's a Good Tool to Screen-Scrape with JavaScript Support
Open Page in New Window Without Popup Blocking
Understanding What Goes on with Textarea Selection with JavaScript
Convert MySQL Datetime Stamp into JavaScript's Date Format
Convert a Directory Structure in the Filesystem to JSON with Node.Js
When Should I Use a Semicolon After Curly Braces
How to Support Promises in Internet Explorer 11
How to Register Event with Useeffect Hooks
How to Access Parent Window Object Using Jquery
Copy to Clipboard in Chrome Extension
How to Detect with JavaScript/Jquery If the User Is Currently Active on the Page