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.
Javascript debugging for IE6/7
You can use Visual Studio for that: http://www.codeproject.com/Articles/18921/Using-Visual-Studio-to-Debug-JavaScript-in-IE
Btw, Microsoft Script Debugger is still available for download : http://www.microsoft.com/download/en/details.aspx?id=22185 and it should still work fine for debugging script in Microsoft browsers.
Debugging JavaScript in IE11
- Open your Page.
- Press
F12
to display the tools. - Switch to the debugging tab.
- Add your breakpoints.
- Refresh by pressing
F5
orCtrl+F5
orCtrl+R
.
Feature equivalent of Google Chrome's 'Add source map...' in Internet Explorer 11
Source-mapping is enabled by default in IE 11 with the Windows 8.1 update installed. No other versions of IE support source-mapping.
Reference:
How to enable source maps
How do I enable source maps? The compiler or minifier generating the JavaScript includes a comment with the name of the map file. For example, if myfile.js was compressed to myfile.min.js by a minifier that supported source maps, it would generate a map file called myfile.min.js.map. and put a comment in myfile.min.js like this:
//# sourceMappingURL=myfile.min.js.map
When you open a file with Debugger tool that has this kind of comment, the tool looks for the map file. If found, the last toolbar icon on the right () is enabled as a toggle. When the icon is toggled on and the source file is where the map indicates, your source code is displayed instead of the compiled JavaScript. If the source file cannot be found, the Debugger tool displays an error message.
New in Cumulative Security Update for Internet Explorer (KB2976627), you can choose a source map for a file. Right click the file's tab to find this option. This is useful for code where comments have been stripped out.
Reference:
Source maps
Debugging JavaScript in IE7
Web Development Helper is very good.
The IE Dev Toolbar is often helpful, but unfortunately doesn't do script debugging
IE Developer Tools breakpoints are not working
Hamlet, in the comments to OP question, gave the correct answer.
Uncheck the following option:
Internet Options > Advanced > Disable Script Debugging (Internet Explorer)
Related Topics
Detecting Load of <Link> Resources
Is JavaScript Execution Deferred Until CSSom Is Built or Not
Why Do Arabic Characters Behave as Separate Characters When Styling Single Arabic Character
Absolute Positioned Floating Header Jitters in Safari
Detecting Load of <Link> Resources
Webkit Scrollbar Dynamic Styling
How to Prevent CSS Interference in an Injected Piece of HTML
Jquery .Position() Strangeness While Using CSS3 Rotate Attribute
Particles.Js Not Covering Entire Page
How to Rotate an Image by a Random Amount Using CSS
Making Links Active in JavaScript
Css3/Js Get Position of Element During Animation
Using CSS Transform Property in Jquery
Start a CSS Animation on Button Click
How to Monitor Requests on Wkwebview
Send a Notification from JavaScript in Uiwebview to Objectivec