3

Is it possible to see TypeScript source maps in console?

I'm using Firefox Developer Edition and the Console is showing the .js line-numbers. I have a single .js file, compiled from multiple TypeScript files.

Chrome and Safari are showing the TypeScript sources correctly.

Mick
  • 8,203
  • 10
  • 44
  • 66

1 Answers1

2

I have been trying to deal with this problem. I found an answer that works for me and have detailed it in an answer here Firefox isnt showing typescript ts source maps in the debugger

Your problem looks similar. Fundamentally it seems because FF does not handle relative paths to the .map files which are specified in your compiled javascript.

Community
  • 1
  • 1
robs
  • 840
  • 10
  • 15
  • In principle, Firefox does handle relative paths to .map files, but there is an issue in conjunction with SystemJS. I have not fully grasped the issue, but you may want to have a look at these links: https://github.com/systemjs/systemjs/issues/820, https://bugzilla.mozilla.org/show_bug.cgi?id=1224078, https://bugzilla.mozilla.org/show_bug.cgi?id=1223439 – Marco Eckstein Jan 03 '17 at 13:29
  • As a workaround, you may want to set "mapRoot" to something like "http://localhost:3000/app/" in tsconfig.json. – Marco Eckstein Jan 03 '17 at 13:33