Skip to content
AgileLogics
4 min read

Debugging TypeScript

Source maps (generated automatically by tsc when "sourceMap": true is set in tsconfig.json) let a debugger show your original .ts source and line numbers, even though what's actually running is the compiled .js — without them, breakpoints would land in unreadable compiled output.

Node's --inspect flag and every browser's devtools both understand source maps automatically once they're generated.