- Configure the JavaScript debugger.
- Transpile the TypeScript code into Javascript.
- In the editor, open the HTML files with the TypeScript references.
- Manually replace the references to the TypeScript files with the references to the JavaScript files that were generated through the transpilation.
- Configure and set breakpoints in the TypeScript code. Although actually debugging will be performed against the generated JavaScript, PhpStorm will emulate TypeScript debugging using the generated source-maps that set correspondence between lines in the the TypeScript and in the JavaScript code.
-
Proceed as if you were debugging JavaScript:
- Initiate a debugging session. For details about local and remote debugging, about debugging single files and entire applications, see Debugging JavaScript.
- Step through the program, stop and resume program execution, examine it when suspended, etc.
Note
Because JavaScript debugging is supported in Firefox or Google Chrome only, TypeScript can also be debugged only in these browsers.

