7

Ok, I created a basic Angular 2 Typescript project using 5 Min QUICKSTART and it's up and running.

My typescript transpiller is configured to create source map:

tsconfig.js

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  }
}

Now I can see the *.ts files in Chrome and can debug them as well with no issue. But Firefox (and FireFox Developer Edition for that matter) not at all showing the .ts files even though the "Show Original Sources" is checked in the debugger options.

enter image description here

Saurabh Palatkar
  • 3,242
  • 9
  • 48
  • 107

3 Answers3

0

It will work for Firefox if you will specify sourcemap with a full path in compiled js file:

//# sourceMappingURL=http://localhost:3000/app/app.component.js.map

It seams like Firefox can not work with relative paths.

NOTE: Chrome will not work with full path

Sargon
  • 262
  • 1
  • 9
0

Hi Saurabh Palatkar, Please Follow this below link. It may helpful to fulfill your need. http://www.gamefromscratch.com/post/2014/05/27/TypeScript-debugging-in-Visual-Studio-with-IE-Chrome-and-Firefox-using-Source-Maps.aspx

Sriram P
  • 21
  • 5
0

You need to add this commented line to your source code

//# sourceMappingURL=http://example.com/path/to/your/sourcemap.map

Maybe try adding:

"typeCheck": true,
David Gourde
  • 3,709
  • 2
  • 31
  • 65