javascriptinternet-explorer-11source-mapsie11-developer-tools

Feature equivalent of Google Chrome's 'Add source map...' in Internet Explorer 11


I am looking for Google Chrome's feature equivalent for 'Add source map...' in Internet Explorer 11. My application does not work in Internet Explorer 11.

Add source map...

Can I add source map to JS code in debug mode in Internet Explorer 11?


Solution

  • 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.

    enter image description here

    Reference:

    Source maps