Debugging JavaScript for IE6

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

  1. Open your Page.
  2. Press F12 to display the tools.
  3. Switch to the debugging tab.
  4. Add your breakpoints.
  5. Refresh by pressing F5 or Ctrl+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.

Sample Image

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



Leave a reply



Submit