0 votes
in TypeScript - JavaScript's Superset by
Is it possible to debug any TypeScript file?

1 Answer

0 votes
by

Yes, it is possible. To debug any TypeScript file, we need .js source map file. So compile the .ts file with the --sourcemap flag to generate a source map file.

$ tsc -sourcemap file1.ts  

This will create file1.js and file1.js.map. And last line of file1.js would be reference of source map file.

...