Skip to main content

2 posts tagged with "Beginner"

View All Tags

How to Manually Read TypeScript SourceMap

· 2 min read
Ivan Tsai
Backend engineer

TypeScript SourceMap

We can generate Source Map files in TypeScript by setting compilerOptions.sourceMap = true in the TypeScript configuration tsconfig.json. This file allows tools like VS Code and Chrome debugger to map the compiled JS files back to the original TypeScript (TS) code.

However, if you receive error stacks from a production environment and want to quickly find the corresponding positions in the TS code, is there a way to do it manually?