O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging

The next big important question would how to debug a Node.js application return in TypeScript. Debugging JavaScript was easy, and to give the same experience TypeScript has a feature called sourcemaps. When sourcemaps are enabled in TypeScript, it allows us to drop breakpoints in TypeScript code, which will be paused when the equivalent line of JavaScript is hit. The sole purpose of sourcemaps is to map the generated source to the original source that generated it. We will briefly see debugging a Node.js, and TypeScript application in our editor VS Code.

Primarily, we need to enable sourcemaps. First of all, we need to ensure that TypeScript has sourcemap generation enabled. Go to your tsconfig.json file and write the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required