0

How to debug on TypeScript code instead of JavaScript code in Chrome?

I only found a way to do that manually every time from the start. I write code in Angular2 with WebStorm 11.

1

2 Answers 2

5

You need to have your transpiler generate .map files.

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

Comments

1

As Adrian said your transpiler needs to produce map info, which can also be generated into the js output file instead of a separate .map file.

One issue you may run into is that within lambda functions (aka arrow functions) you will not be able to see your variables, neither in chrome nor in WebStorm. However, there is a setting in WebStorm that allows you to see your this. variables properly within the WebStorm debugger:

Goto Help, Find Action, enter "registry". In the registry check js.debugger.map.this.by.source.code

Comments

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.