10

I can easily debug my Angular 2 (from an Angular-CLI generated project) Typescript files in Chrome and Firefox but I am unable to debug any of my typescript file in IE 11. All files I can see in the list are of type .js Can anyone guide me on what I am doing wrong or how to debug the application in IE?

DaveyDaveDave
  • 9,821
  • 11
  • 64
  • 77
Haseeb Wali
  • 1,181
  • 3
  • 14
  • 34
  • Consider using polyfills to enable IE11 compatibility https://angular.io/guide/browser-support#polyfills. Are you using angular-cli? Is your application Angular 4? – Leo Caseiro Sep 24 '17 at 23:46

4 Answers4

7

in IE 11 you need to open your .ts file in debugger it found under "Dynamic Scripts".

Dynamic Scripts

scroll down to and locate your .ts file and open it in debug.

Select you file

clemens
  • 16,716
  • 11
  • 50
  • 65
4

IE 11 wont handle the maps files for you automatically like Chrome does. So you have to choose the map file manually by right clicking on the js file tab:

enter image description here

then you should be able to debug your .ts file

enter image description here

However after the app gets reloaded you have to choose the source map file again, that is just wired experience and I would not recommend to debug you app in IE 11 at all unless you are experiencing some specific IE 11 bug.

angularrocks.com
  • 26,767
  • 13
  • 87
  • 104
1

Apparently, the only way to debug .ts files with IE 11 is to create your own mappings between your .ts files and your transpiled/minified .js files, by creating .map files.

The feature is available only for Windows 8.1 and higher.

More information in the official doc, at the "Source maps" section.

Louis
  • 1,913
  • 2
  • 28
  • 41
0

Set value "sourceMap" to true in angular.json file of your application.