13

In IE doesn't work //@ sourceURL.

appLoader.loadScriptContent(doc, scriptData.data + "//@ sourceURL=" + scriptData.url );

In Another browsers it's OK. How can I change this code for working in IE ?

Spudley
  • 166,037
  • 39
  • 233
  • 307
Geray Suinov
  • 3,521
  • 3
  • 16
  • 19

2 Answers2

16

With the latest update that came with Windows 8.1, IE11 now supports source map: https://all-markup-news.com/whats-new-in-f12-with-windows-8-1-update/ Works in Win7 as well.

rofrol
  • 14,438
  • 7
  • 79
  • 77
samyem
  • 437
  • 5
  • 16
  • 2
    It is useful for development debugging, but less useful for production, because IE does not put the sourceURL into the stack trace for the exception (whereas Chrome does). – robocat Nov 26 '14 at 22:31
  • 4
    Any idea how to *disable* it? – adamdport Sep 16 '16 at 15:32
15

UPDATE: See the other answer, IE11 supports //# sourceURL, which is also supported by recent Firefox & Chrome.

Sorry to be the bearer of bad news, but IE does not support source mapping. It's not even IE11 (at least not in the IE11 preview, anyway).

It may come eventually, but for now the answer is you can't do it. Sorry.

That said, as of this moment, it's still an experimental feature even in the browsers that do support it, and is still subject to change -- for example, I note that the syntax is being changed from //@ to //# in the nightlies, due to a clash with IE's existing JS conditional-comment syntax (//@cc_on etc).

Community
  • 1
  • 1
Spudley
  • 166,037
  • 39
  • 233
  • 307
  • And so...what should I do? :) – Geray Suinov Jul 30 '13 at 13:47
  • 4
    Nothing you can do. IE doesn't support it. If you want to debug in IE, you'll have to use the uncompressed source code for the time being. I'd be willing to bet they'll bring it in for IE12, but that's still some time away. – Spudley Jul 30 '13 at 13:52
  • @JosephLust What do you mean Chrome and IE - specifically I care about what you mean about IE – Kristopher Apr 08 '14 at 20:00
  • 2
    @Wartickler please see http://blog.oio.de/2014/04/04/internet-explorer-11-source-map-based-debugging/ – Joseph Lust Apr 09 '14 at 00:45
  • The part highlighted in yellow did not work for my jquery 1.11.2 in IE11. There is no option to see unminified files via Debugger in F12. Source maps work seamlessly in Firefox. – Victor Zakharov Feb 06 '17 at 22:24