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.

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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: github.com/systemjs/systemjs/issues/820, bugzilla.mozilla.org/show_bug.cgi?id=1224078, bugzilla.mozilla.org/show_bug.cgi?id=1223439
As a workaround, you may want to set "mapRoot" to something like "localhost:3000/app" in tsconfig.json.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.